1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2026-03-18 08:25:54 +01:00
aerc/worker/notmuch
Robin Jarry 9e77103592 notmuch: simplify source URL and use automatic discovery
Replace the explicit database path and config file in the source URL
with automatic discovery via libnotmuch (environment variables
NOTMUCH_CONFIG, NOTMUCH_DATABASE, NOTMUCH_PROFILE and XDG conventions).
The source URL hostname is now interpreted as an optional profile name:

    source = notmuch://
    source = notmuch://work

Replace the maildir-store path option with an enable-maildir boolean
(default: true). The maildir root is now always obtained from the
notmuch API via notmuch_config_get(NOTMUCH_CONFIG_MAIL_ROOT) instead
of being specified manually.

Deprecation warnings are emitted when old-style source URLs with
database paths or the maildir-store option are detected in
accounts.conf. Legacy database paths are identified by checking if
the URL hostname+path resolves to an existing file or directory on
disk; if it does not exist, it is treated as a profile name.

The account wizard no longer shells out to "notmuch config get" to
pre-fill the database path. The server field now accepts an optional
profile name instead.

Remove dead code from lib/notmuch/ related to database and config paths.

Implements: https://todo.sr.ht/~rjarry/aerc/325
Changelog-changed: The notmuch maildir-store option has been replaced
 by enable-maildir (default: true). The maildir root is always obtained
 from the notmuch database configuration.
Changelog-changed: The notmuch source URL no longer accepts an explicit
 database path or config query parameter. Database and configuration
 are now discovered automatically. An optional profile name can be
 specified as the URL hostname.
Changelog-deprecated: The notmuch maildir-store option and explicit
 database paths in the source URL now emit deprecation warnings.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: septante <septante@memeware.net>
Acked-by: septante <septante@memeware.net>
2026-03-07 21:39:01 +01:00
..
lib notmuch: simplify source URL and use automatic discovery 2026-03-07 21:39:01 +01:00
eventhandlers.go worker: add directory and filter metadata to response messages 2026-02-09 14:46:27 +01:00
message.go notmuch: only read message headers when sorting 2026-02-10 11:06:15 +01:00
message_test.go notmuch: add strategies for multi-file messages 2024-04-02 22:22:28 +02:00
notmuch.go notmuch: set the "passed" tag when forwarding msgs 2024-08-20 11:54:34 +02:00
search.go completion: display descriptions next to choices 2024-10-23 10:22:51 +02:00
worker.go notmuch: simplify source URL and use automatic discovery 2026-03-07 21:39:01 +01:00