507ea8e18e
mu-sexp: don't require > c++17
2025-03-23 20:22:56 +02:00
44ba631a34
mu-find: implement format=json2
...
Implement a new experimental json2 format for mu-find, which gets rid of
the ":" prefixes for fields, i.e., "subject" instead of ":subject".
Document it as well.
2025-03-23 19:47:09 +02:00
4cda859eb8
mu-sexp: tighten definition of plistp
...
In a plist, we also require the first of each two element pairs to start
with ':'
Fixes #2830 .
2025-03-23 19:47:09 +02:00
0e0d4a0cb6
mu-sexp: add -unix output for json tstamps
...
The json output (for mu-find etc.) just showed the converted sexp
output, including the clumsy emacs-style tstamps (for changed/date).
Add unix timestamps as well, which are easier to work with outside
emacs.
This handles #2770 .
2024-12-07 12:14:55 +02:00
e48485cb58
sexp: use fmt for parsing_error
...
Should help with Apple clang build too.
2023-07-05 23:40:36 +03:00
4920b56671
update to use fmt-based apis
...
Not complete, but a first big stab converting users of Mu::Error and
various g_warning & friends, format to the new libfmt-based APIs.
2023-07-05 23:10:13 +03:00
742ca33740
utils: rework Mu::Error and g_ logging macros with fmt
...
A bit more C++ template magic to remove a lot of code.
2023-07-05 23:07:11 +03:00
ae9607530f
utils/sexp: extend and improve tests
...
Extend functionality for parsing; update documentation, tests.
2023-06-27 00:52:07 +03:00
9bab2a4050
utils/sexp: add some convenience
...
Add some convenience function for dealing the head/tail
Some whitespace / cosmetics
Add operators ==
Add operator !=
Update command handler for this.
2023-06-04 14:56:40 +03:00
ff1e06c7c8
mu-find: restore JSON output
...
Fixes #2453
2023-03-30 18:12:33 +03:00
dfc2cb12d7
sexp: major rework / API improvements
...
Use a bit nicer/modern c++, since we're using C++17 now. Add more tests.
2022-11-07 18:37:23 +02:00
9c9f9ecae3
lib: improve coverage a bit
2022-05-23 23:55:11 +03:00
da8489d0f6
sexp: allow for some prettified string output
...
Allow for adding newlines between list items
2022-05-06 22:17:53 +03:00
6126d7ee62
store: ensure updates update message sexp too
...
And turn all "add" into "replace" so old messages get removed.
Update tests too.
2022-05-05 01:40:17 +03:00
3dd721d5a3
clang-format: update c/cc coding style
...
Update all cc code using .clang-format; please do so as well for future PRs
etc.; emacs has a handy 'clang-format' mode to make this automatic.
For comparing old changes with git blame, we can disregard this one using
--ignore-rev
(see https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame )
2021-10-20 12:26:16 +03:00
dc6f76d74d
seperate Mu::format and Mu::vformat
2021-04-22 18:32:38 +00:00
d2aa1f91b0
mu: support json output directly
...
Allow for dumping json directly from the Sexp structures, so we don't
need any external libs (i.e. json-glib) anymore.
2020-10-26 18:39:56 +02:00
31dd4e2104
utils/sexp: Clean up API and implementation
...
Also update the tests and command-parser.
2020-07-13 21:43:59 +03:00
a9fab4abcc
mu: convert command-line tools to c++
2020-06-13 16:56:41 +03:00
3afdc08d50
lib/utils: build s-expression programmatically building
...
Allow for programmatically buildings sexps, rather that using raw
strings.
2020-06-06 14:27:25 +03:00