Commit Graph

1328 Commits

Author SHA1 Message Date
4acf708eb9 logging: don't g_message with --quiet
When `--quiet` is passed (and not --debug), do not log with g_message at
startup.
2026-08-20 15:04:27 -07:00
976b6210fc message: ensure message text is valid utf8
Seems this is not guaranteed, so convert if needed.
2026-08-20 15:04:27 -07:00
5c6642c9b9 utils: add utf8_clean helper
To morph text into valid utf8 if it isn't already.
2026-08-20 15:04:27 -07:00
056540b8e8 utils: avoid fmt:gmtime/fmt::localtime
They've been deprecated and give build warnings with new enough libfmt.
2026-08-20 15:04:26 -07:00
652b5ccbea labels: tighten labels regexp 2026-08-20 15:04:26 -07:00
461e4f83fe store-test: add more label tests
Ensure removal affects the labels cache.
2026-08-20 15:04:26 -07:00
c547cde73e store: remove some _unlocked functions, update clear_labels
They don't add much value, let's remove.

Rework clear_labels in terms of update_labels.
2026-08-20 15:04:26 -07:00
33ab0acc8d store: update labels when removing messages
This does make removing a bit slower...
2026-08-20 15:04:26 -07:00
3a12c69b10 mu: refactor labels code
Split labels-cache and store-labels.
2026-08-20 15:04:26 -07:00
124b371850 labels: allow restoring cache-map
E.g. with unexpected termination for mu it is possible that the
labels-cache (i.e., the one that is used for auto-completion) gets disconnected
from reality.

Add a --restore option to `mu label list` to restore the actual labels from the
labels seen in the store.
2026-08-20 15:04:26 -07:00
bb399bc37a store: implement serialize method, use it
For triggering saving the contacts / labels caches.
2026-08-20 15:04:26 -07:00
c074c138f8 store: improve label handling
In particular, clear_labels

And some cosmetics
2026-08-20 15:04:26 -07:00
bf2f4ce57d server: add label handler
For handling mu4e label update requests.
2026-08-20 15:04:26 -07:00
2fa973ec90 mu-label: allow more characters
reduce the number of "taboo" characters in labels.

update docs.
2026-08-20 15:04:26 -07:00
76b9000588 mu-document: improve sexp updating
Ensure the cached message sexp gets updated in all cases where it's necessary.
2026-08-20 15:04:26 -07:00
d07a5bc2c1 labels: implement parse_delta_labels
Convenience function for parsing a series of delta labels; add tests as well.
2026-08-20 15:04:26 -07:00
543c43f078 Replace "the the " with "the " 2026-08-20 15:04:26 -07:00
5a6ca68846 mu4e/server: get cached list of labels
This will be useful with label commands.
2026-08-20 15:04:26 -07:00
5378f321f4 utils: add set_thread_name
With HAVE_PTHREAD_SETNAME_NP
2026-08-20 15:04:25 -07:00
02a0dc4333 mu-server: implement exposing the socket-path
Add the scm-socket-path to the ping-properties we expose for mu4e.
2025-08-24 11:54:08 +03:00
cacac82070 mu-query-results: add decrement operators
So we can easily iterator from end->begin
2025-08-22 07:58:59 +03:00
8c706a77db mu-init: automatic export labels with --reinit
When re-initializing the store, automatically write the labels to a file in mu's
cache, so user can later import them.
2025-08-16 16:20:33 +03:00
a6b1f47a30 labels: refactor import/export to mu-store-labels
Move the import/export code to 'lib'.
2025-08-16 12:18:21 +03:00
f504289a02 labels: ensure c++17 compatibility
This broke the build earlier.
2025-08-16 08:43:41 +03:00
46fa4f2aa2 mu: add 'label' command + manpage + tests
Add a label command and document it.
2025-08-15 21:03:19 +03:00
1e628dfcab store: add support for modifying and listing labels and caching
Add methods update_labels, clear_labels which update or clear the labels for a
message in the store, and update the cache with the overall counts of labels.

Add a LabelsCache to keep track of the counts and labels_map() to retrieve that
map.
2025-08-15 21:02:24 +03:00
552bb3a7c8 message: add support for labels + tests
Labels are strings associated with messages, which can be used for searching
them.
2025-08-15 21:02:24 +03:00
34d3bf2e28 tests: only build when needed
Build the tests lazily, i.e., not before `meson test`. This helps with
build-times.
2025-08-15 21:01:05 +03:00
8d3b65c5d8 utils: refactor count_nl from mu-cmd-find
And update users.
Please enter the commit message for your changes. Lines starting
2025-07-27 19:39:23 +03:00
28ea23a2a3 contacts-cache: cosmetics 2025-07-27 19:39:23 +03:00
33958cd0f7 fmt: prefer system package if found
mu embeds a "vendored" subset of the libfmt package under thirdparty; but it's
better to use the system-package if the user has one.

So, use the system package if found or user -Duse-embedded-fmt=true is
specified.
2025-07-24 19:55:27 +03:00
3b8edda881 mu-config.hh: unbreak mac build
The mac build broke (CI) because there's no conversion from time_t -> SCM
defined. Since we want to use int64_t anyway (2038), simply change to that.
2025-07-12 12:00:09 +03:00
8d46f80bb9 mu-config: split get() into get_str() and decode()
Makes it easier to use elsewhere.
2025-07-12 09:35:37 +03:00
652c7dc6b5 mu-mime-object.hh: fix some typos 2025-07-05 11:04:37 +03:00
e647ca924d server: make index log back-off a bit more concise 2025-06-30 21:50:16 +03:00
0d7ddba9fd fix typo 2025-07-01 00:48:40 +08:00
507925ca4b indexer sleep exp backoff 2025-07-01 00:34:36 +08:00
7f274fe518 mu-test: fix logging verbosity
We were logging _everything since the g_log_set_handler was only set for the
default domain, not "mu". Let's fix this.
2025-06-16 10:57:36 +03:00
eb75141d0a mu_utils: add to_string_char
Like to_string_gchar, but for malloc/free strings.
2025-06-14 13:14:03 +03:00
151917ce51 mu-maildir.cc: fix typo
Use the right #define in the dirent check. Seems we were always following the
slow path.
2025-06-10 10:04:53 +03:00
1527976729 mu-cfind/contacts-cache: refactor matching in for_each
Move some of the code in from the command-line tool to contacts-cache, for
possible re-use. Clean up a bit while doing so.
2025-06-10 10:04:53 +03:00
9496d6523d lib: improve xapianizer / xapian_term 2025-05-26 09:17:37 +03:00
668d5ffb99 contacts/contacts-cache: cleanups
refactor code a bit; move sorting to Contact

remove unneeded hashing in Contact (just use the email address)
2025-05-26 09:17:37 +03:00
cc1112d342 tests: skip some slow tests when valgrinding 2025-05-24 21:04:49 +03:00
e367f5b0d1 mu-scanner: improve ignore_dentry check 2025-05-24 19:18:52 +03:00
452969355c mu-test: add valgrind check
Make it a bit easier to skip some tests when running under valgrind.
2025-05-24 19:18:10 +03:00
ec3b55f2ab message: retain non-file flags when moving
The content-flags won't change, and the unread-flag can be re-calculated.

Add a unit test, and some small doc improvements.

Fixes #2831.
2025-05-24 17:17:00 +03:00
f75e1203d4 mu: rename --my-address into --personal-address
This makes things a bit more uniform with all the places where we use
"personal".

--my-address remains as an alias for the command-line option.

Add unit test.

Resolves #2806.
2025-05-24 17:17:00 +03:00
a7778fc333 test-store: don't break on slow systems
The 'circular-symlink' test.
2025-04-13 20:34:44 +03:00
a2a1838da4 mu-server: cleanup find prop handling
Rework the overly long find-handler.

Improve parsing of options, and return better return properties (for use
in mu4e).
2025-04-12 15:07:28 +07:00