1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-20 06:46:50 +02:00
Commit Graph

550 Commits

Author SHA1 Message Date
Dirk-Jan C. Binnema
2d20074b99 mu-move: add new move sub command
Add sub-command to move messages; add tests and docs.

Fixes #157
2023-09-24 17:29:08 +03:00
Dirk-Jan C. Binnema
11003000e8 mu: log warning when exiting with error 2023-09-23 09:26:37 +03:00
Dirk-Jan C. Binnema
94c90bd0c5 fields: 'phrasable' instead of 'indexable'
'Phrasable' is probably a bit clearer description.
2023-09-17 18:11:10 +03:00
Dirk-Jan C. Binnema
da49e77449 mu-info: add 'maildirs' topic
For showing all maildirs under the root.
2023-09-16 11:12:16 +03:00
Dirk-Jan C. Binnema
c78dafd723 provide end-user hints and show them
Only a few for now.
2023-09-16 11:12:16 +03:00
Dirk-Jan C. Binnema
3ee2ce9647 mu/mu: tweak logging / exception handling 2023-09-13 23:04:44 +03:00
Dirk-Jan C. Binnema
2f5602b938 unit tests: improve
and add a new one for the indexer
2023-09-12 21:38:57 +03:00
Dirk-Jan C. Binnema
65460c25b6 mu-info: add some more version info
glib & gmime
2023-09-12 21:35:47 +03:00
Dirk-Jan C. Binnema
8287b9802e lib: replace mu-bookmarks with mu-query-macros
And add some unit tests.
2023-09-11 23:54:56 +03:00
Dirk-Jan C. Binnema
af9eb36ca0 unit-tests: modernize
Use TempDir, join_paths etc.
2023-09-11 23:51:37 +03:00
Dirk-Jan C. Binnema
53c7381929 lib: move index/ into main lib/
simplify things a bit
2023-09-10 08:55:25 +03:00
Dirk-Jan C. Binnema
3e5cec0d05 tests: update for new query parser / ngrams 2023-09-09 17:57:42 +03:00
Dirk-Jan C. Binnema
264bb092f0 support xapian ngrams
Xapian supports an "ngrams" option to help with languages/scripts
without explicit wordbreaks, such as Chinese / Japanese / Korean.

Add some plumbing for supporting this in mu as well. Experimental for
now.
2023-09-09 17:26:20 +03:00
Dirk-Jan C. Binnema
f6122ecc9e mu-find: add --analyze option
For analyzing queries with the new query-parser.
2023-09-09 11:59:59 +03:00
Dirk-Jan C. Binnema
d7f8a64b20 mu: modernize command-line unit tests 2023-08-27 11:07:55 +03:00
Dirk-Jan C. Binnema
15f08488d3 remove Mu::format, use mu_format
Use the new fmt-based formatting.
2023-08-19 20:04:50 +03:00
Dirk-Jan C. Binnema
4945e699c8 lib/mu: use fmt-based time/date formatting
For a small speedup
2023-08-06 16:19:43 +03:00
Dirk-Jan C. Binnema
aea95b5be0 mu-server: use strings, not sexps object (optimization)
When passing messages to mu, often we got a (parsed from string)
message-sexp from the message document; then appended some more
properties ("build_message_sexp").

Instead, we can do it in terms of the strings; this is _a little_
inelegant, but also much faster; compare:

(base)
[mu4e] Found 500 matching messages; 0 hidden; search: 1298.0 ms (2.60 ms/msg); render: 642.1 ms (1.28 ms/msg)

(with temp-file optimization (earlier commit)
[mu4e] Found 500 matching messages; 0 hidden; search: 1152.7 ms (2.31 ms/msg); render: 270.1 ms (0.54 ms/msg)

(with temp file optimize _and_ the string opt (this commit)
[mu4e] Found 500 matching messages; 0 hidden; search: 266.0 ms (0.53 ms/msg); render: 199.7 ms (0.40 ms/msg)
2023-08-04 00:09:02 +03:00
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
a71b4f5e8d options: expand option file paths
Fixes #2528
2023-08-03 22:47:27 +03:00
Dirk-Jan C. Binnema
ade62fc67c options: implement ExpandPath transformer
For expanding shell options (with expand_path / wordexp)

Note that e.g. in zsh: --maildir=~/Maildir is handled (program receives
--maildir=/home/user/Maildir) but e.g. bash does not do that, and the
program receives the literal '~/Maildir'

We expanded this in mu earlier, so let's do that again.
2023-08-03 22:47:27 +03:00
Dirk-Jan C. Binnema
5409c2cd87 mu-view: attempt to avoid locale diffs in test
A bit ugly attempt make tests work in CI
2023-07-30 00:51:12 +03:00
Dirk-Jan C. Binnema
3a38d6366a mu-view: test locale to C for tests 2023-07-29 17:25:07 +03:00
Dirk-Jan C. Binnema
3ada6af63a mu-view: check for timezone availability in tests 2023-07-29 16:39:44 +03:00
Dirk-Jan C. Binnema
1f0342a91f mu-view: add unit-test 2023-07-28 19:43:46 +03:00
Dirk-Jan C. Binnema
455119f695 Merge branch 'wip/djcb/html-to-text' 2023-07-26 19:11:41 +03:00
Dirk-Jan C. Binnema
30b0209f8d mu-info: add 'topic mu' information; improve manpage
Show some more runtime information in the 'mu' topic, and make that the
default. Update manpage.
2023-07-26 19:09:18 +03:00
Dirk-Jan C. Binnema
b795242d5a message: use html-to-text scraper for html parts
We were dumping the HTML-parts as-is in the Xapian indexer; however,
it's better to remove the html decoration first, and just pass the text.

We use the new built-in html->text scraper for that.
2023-07-25 21:26:36 +03:00
Dirk-Jan C. Binnema
23ba61a650 mu-find: internal cleanups / modernization
use fmt and Result-based APIs.
2023-07-25 21:26:01 +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
85a2490300 mu-init: improve user output 2023-07-25 11:11:53 +03:00
Dirk-Jan C. Binnema
3337c9babb mu-view: add --format=html
Support showing the HTML body (if any) instead of the default plain-text
body.

Update manpage.
2023-07-23 21:04:26 +03:00
Dirk-Jan C. Binnema
7b38f094c4 migrate some more code to mu_format / join_paths
Let's modernize a bit.
2023-07-20 23:14:29 +03:00
Dirk-Jan C. Binnema
ecb3c9139f mu-mkdir: add unit tests 2023-07-19 08:48:44 +03:00
Dirk-Jan C. Binnema
0cb78fe4d1 mu-remove: add unit test 2023-07-18 21:33:59 +03:00
Dirk-Jan C. Binnema
8b66491a72 mu-add: update unit test 2023-07-18 21:33:33 +03:00
Dirk-Jan C. Binnema
3c9d1f1ab1 mu: cmd-init: fix batch-size typo
Copy-pasta
2023-07-16 13:19:35 +03:00
Dirk-Jan C. Binnema
a32b924692 mu: add "unit" tests for 'mu add' 2023-07-10 23:15:40 +03:00
Dirk-Jan C. Binnema
31f0c40893 migrate to fmt-based logging in some more places
and improve logging.
2023-07-08 10:30:36 +03:00
Dirk-Jan C. Binnema
82235b9d49 fmt: more update to use new fmt-based APIs 2023-07-06 21:49:50 +03:00
Dirk-Jan C. Binnema
d96e9cc4ba mu-info: improve docs; better colors 2023-07-06 19:13:14 +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
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
Dirk-Jan C. Binnema
9004363aa5 cli: merge 'fields' with 'info' command
Update the 'info' command to handle 'fields' as well; remove
fields.
2023-07-05 20:39:47 +03:00
Dirk-Jan C. Binnema
d6416fca5e cli: add mu-cmd-{add,mkdir-remove}.cc
Missing from previous.
2023-07-02 10:04:01 +03:00
Dirk-Jan C. Binnema
c4b5795328 cli: support --ignored-address for init command
Allow for skipping unwanted addresses (such as 'noreply') from the
contacts cache.
2023-07-02 10:00:40 +03:00
Dirk-Jan C. Binnema
960a436e77 cli: split off commands into their own .cc files
Smaller files are easier to manage
2023-07-02 00:06:56 +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
ecf87c5d82 gmime-test: fix leak 2023-06-11 12:23:23 +03:00
Dirk-Jan C. Binnema
9544473e35 mu extract/view/verify: allow reading message from stdin
Fixes #1463.
2023-04-30 10:35:28 +03:00