Dirk-Jan C. Binnema
924bb2145e
mu-server: implement temp-file optimization
...
It can be faster to feed big mu -> mu4e data, such as contacts are
message headers through a temp-file instead directly though stdout;
implement this, and add the server parameter --allow-temp-file.
Implement this the "contacts" and "find" commands.
2023-08-04 00:09:02 +03:00
Dirk-Jan C. Binnema
dcf2298680
mu: use fmt-based apis in mu index/server and options
...
iostream is so 1998.
2023-07-25 21:11:56 +03:00
Dirk-Jan C. Binnema
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
Dirk-Jan C. Binnema
c6fff6a281
all: update for API changes (config etc.)
...
Use the new & improved APIs.
2023-07-02 00:06:56 +03:00
Dirk-Jan C. Binnema
8762ac27dc
mu: improve error numbers
...
Ensure they match what mu expects.
2023-04-11 20:47:48 +03:00
Dirk-Jan C. Binnema
3d4805de0c
server: small output improvement
...
For human users.
2023-02-17 10:20:14 +02:00
Dirk-Jan C. Binnema
7db93fb0a7
mu-server: cosmetic
2023-01-29 12:03:13 +02:00
Dirk-Jan C. Binnema
36f6e387ae
mu: implement new command-line parser
...
Implement a new command-line parser, based on CLI11.
It's a bit more C++'ish, and allows for a lot of fancy things... some of
which we have implemented here.
Update the various commands to use the new Options struct
Remove the old help strings; instead e.g. `mu help view` opens the
manpage.
Integrate the guile scripts more tightly.
2022-11-17 11:00:06 +02:00
Dirk-Jan C. Binnema
08ffba42b9
mu/cmd: update for new sexp API
...
Makes the code a bit cleaner.
2022-11-07 18:38:03 +02:00
Dirk-Jan C. Binnema
734445f78d
mu-server: add a bit more debugging info
2022-05-30 20:30:33 +03:00
Dirk-Jan C. Binnema
158117e843
mu: Make commands Result-based
...
Use Result<void> as the return value, simplifying some code.
2022-05-12 08:56:13 +03:00
Dirk-Jan C. Binnema
80d84bf635
store: use Result<Store> builder, add auto upgrade
...
Make it a Result type, and add auto-upgrade (not enabled yet)
Update dependents.
2022-05-09 22:25:28 +03:00
Dirk-Jan C. Binnema
da8489d0f6
sexp: allow for some prettified string output
...
Allow for adding newlines between list items
2022-05-06 22:17:53 +03:00
Dirk-Jan C. Binnema
f10a7560f7
build: fix some warnings
2022-02-21 23:51:46 +02:00
Dirk-Jan C. Binnema
3820118246
store: rename "metadata" into "properties"
...
properties are the constant (for the duration) values for a store; metadata may
change, so reserve that name for that.
2022-02-14 11:12:26 +02:00
Dirk-Jan C. Binnema
b6d7d142f6
server: support flushing the output
...
So we can get some progress output
2022-02-03 23:04:18 +02:00
Dirk-Jan C. Binnema
12658a3dc6
cmd-server: improve signal handling
...
use a static signal handling function, which is easier to check than a lambda.
2022-01-30 14:52:41 +02:00
Dirk-Jan C. Binnema
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
Dirk-Jan C. Binnema
8a3a125ca3
mu-cmd-server: report errors to mu4e
...
Even "existential errors" that cause mu-server not to start.
2021-07-31 01:48:24 +03:00
Dirk-Jan C. Binnema
01ced9a356
mu: Update for new querying APIs
2021-01-22 22:51:33 +02:00
Dirk-Jan C. Binnema
3ff8fd165f
cmd-server: use std::fflush
2020-12-07 00:35:58 +02:00
Dirk-Jan C. Binnema
0ef88af34e
cmd-server: fflush before reading next line
...
Seems this is necessary on Windows/MSYS2. HT to juanjosegarciaripoll.
2020-12-06 17:04:10 +02:00
Dirk-Jan C. Binnema
a1d1619bda
use c++ for some more sources
...
Do a (superficial) port to c++ of some of the c sources. Update
deps. Fix a few compiler warnings.
2020-11-07 14:11:59 +02:00
Dirk-Jan C. Binnema
2135844e1b
fix some compiler warnings
2020-11-01 14:25:25 +02:00
Dirk-Jan C. Binnema
aea64c4a08
mu/lib: refactor mu(-cmd)-server code
...
Split off the parsing/handling code from the mu command server into
mu-server, and only leave the external interface (the mu4e repl) in
mu-cmd-server.
2020-10-31 09:46:13 +02:00
Dirk-Jan C. Binnema
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
Dirk-Jan C. Binnema
092084b987
cmd: Update find, server for Sexp changes
2020-07-13 21:43:59 +03:00
Dirk-Jan C. Binnema
ba13a62e90
cmd-server: Update to use the new Indexer
2020-06-27 17:07:00 +03:00
Dirk-Jan C. Binnema
c8e8004f29
server: show complete help by default
...
And add :terse to get a one-line description.
2020-06-27 10:24:37 +03:00
Dirk-Jan C. Binnema
68533cee0d
mu: use g_printerr for errors, instead of g_warning
...
With the new logging setup, we need g_printerr
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
9b2746dce5
server: use symbolic names with ':'
...
After the command-parser changes
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
3dc4b93989
mu4e/server: implement mark-as-read for (view ...)
...
Instead of a multi-step process to display an unread message (ie. get
the original, notice it's unread, then update it, replace the message
with update one etc.), we now handle that in the (view /./..) command on
the server side.
Simplifies things, and is faster (which could be noticeable, esp. if
e.g. signature verification is part of the process)
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
0b427e5ee8
server: use Mu::Store in c++ mode
...
I.e. Mu::Store instead of mu_store_*
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
a9fab4abcc
mu: convert command-line tools to c++
2020-06-13 16:56:41 +03:00
Dirk-Jan C. Binnema
9fa09f2c16
server: use sexp builder for return parameters
...
Generate sexps programmatically rather than with string-formatting,
using the new mu-sexp capabilities.
2020-06-06 14:27:25 +03:00
Dirk-Jan C. Binnema
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
Dirk-Jan C. Binnema
b60cfc7df2
mu-server: restore readline-support
...
Restore readline support for `mu server' (but _only_ when readline is
found and when in tty mode)
2020-05-25 18:34:42 +03:00
Jonas Bernoulli
564d892701
Fix typos
2020-05-12 23:56:55 +02:00
Dirk-Jan C. Binnema
55cac6f2e5
mu-server: disable readline support for now
...
Seems to be causing problem in non-interactive mode
2020-05-11 22:04:01 +03:00
Dirk-Jan C. Binnema
f3b70bf049
mu: support --eval for server testing
...
Add a hidden command-line argument, just for testing.
2020-05-05 21:24:37 +03:00
Dirk-Jan C. Binnema
46ae663937
mu4e: use faster count queries, document differences
...
Use faster queries for counting read/unread messages; document why the
results might differ from what you get doing a normal search.
2020-03-15 01:23:01 +02:00
Dirk-Jan C. Binnema
f0a0c3ad46
server: reinstate readline support (when available)
2020-03-01 02:08:23 +02:00
damon-kwok
56b434347e
error fix for gcc 9.x
2020-02-29 20:40:22 +08:00
Dirk-Jan C. Binnema
36a5d291d9
server/mu4e: update decrypt/verify options
...
"extract-encrypted" -> "decrypt"
and a separate option for "verify"
2020-02-28 00:43:08 +02:00
Dirk-Jan C. Binnema
4226a6e47f
server: better readline check
...
Avoid _partial_ setups.
Fixes #1594 .
2020-02-27 18:55:08 +02:00
Dirk-Jan C. Binnema
0e75f84228
server/find: handle maxnum correctly
...
If it's nil, use '-1' so we get unlimited results.
Fixes #1592 .
2020-02-26 19:32:53 +02:00
Dirk-Jan C. Binnema
adbb57c098
server: enable repl history
2020-02-21 19:19:30 +02:00
Dirk-Jan C. Binnema
ed1fcda81a
server: use MU_QUERY_FLAG_SKIP_UNREADABLE by default
2020-02-21 01:42:37 +02:00
Dirk-Jan C. Binnema
8d6d151090
server: support readline history / persistence
...
When using readline, remember the last 50 commands; persist.
2020-02-21 01:17:23 +02:00
Dirk-Jan C. Binnema
000c19e505
server: improve error message
2020-02-18 12:03:42 +02:00