diff options
author | Jason Cox <me@jasoncarloscox.com> | 2024-02-23 11:40:17 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-04-02 22:22:28 +0200 |
commit | 1ce82f50d0981a9ee047e75d94c7ab496070bd4a (patch) | |
tree | 72d835ad5da26eea6d5a6acbdd916640b75f1a4e /doc/aerc-notmuch.5.scd | |
parent | 54a72f83035bdf710368846e55a5b003ccab66cd (diff) | |
download | aerc-1ce82f50d0981a9ee047e75d94c7ab496070bd4a.tar.gz |
notmuch: add strategies for multi-file messages
A single notmuch message can represent multiple files. As a result,
file-based operations like move, copy, and delete can be ambiguous. Add
a new account config option, multi-file-strategy, to tell aerc how to
handle these ambiguous cases. Also add options to relevant commands to
set the multi-file strategy on a per-invocation basis.
If no multi-file strategy is set, refuse to take file-based actions on
multi-file messages. This default behavior is mostly the same as aerc's
previous behavior, but a bit stricter in some cases which previously
tried to be smart about multi-file operations (e.g., move and delete).
Applying multi-file strategies to cross-account copy and move operations
is not implemented. These operations will proceed as they have in the
past -- aerc will copy/move a single file. However, for cross-account
move operations, aerc will refuse to delete multiple files to prevent
data loss as not all of the files are added to the destination account.
See the changes to aerc-notmuch(5) for details on the currently
supported multi-file strategies.
Changelog-added: Tell aerc how to handle file-based operations
on multi-file notmuch messages with the account config option
`multi-file-strategy` and the `-m` flag to `:archive`, `:copy`,
`:delete`, and `:move`.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Tested-by: Maarten Aertsen <maarten@nlnetlabs.nl>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'doc/aerc-notmuch.5.scd')
-rw-r--r-- | doc/aerc-notmuch.5.scd | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/doc/aerc-notmuch.5.scd b/doc/aerc-notmuch.5.scd index 6837f720..202f20fd 100644 --- a/doc/aerc-notmuch.5.scd +++ b/doc/aerc-notmuch.5.scd @@ -68,9 +68,8 @@ options are available: N.B.: aerc will still always show messages and not files (under notmuch, a single message can be represented by several files), which makes the - semantics of certain commands as *move* ambiguous: for example, if you - try to move a message represented by several files, aerc will not know - what to do and thus refuse. + semantics of certain commands as *move* ambiguous. Use *multi-file-strategy* + to tell aerc how to resolve these ambiguities. *maildir-account-path* = _<path>_ Path to the maildir account relative to the *maildir-store*. @@ -78,6 +77,25 @@ options are available: This could be used to achieve traditional maildir one tab per account behavior. The note on *maildir-store* also applies to this option. +*multi-file-stategy* = _<strategy>_ + Strategy for file operations (e.g., move, copy, delete) on messages that are + backed by multiple files. Possible values: + + - *refuse* (default): Refuse to act. + - *act-all*: Act on all files. + - *act-one*: Act on one of the files, arbitrarily chosen, and ignore the + rest. + - *act-one-delete-rest*: Like *act-one*, but delete the remaining files. + - *act-dir*: Act on all files within the current folder and ignore the rest. + Note that this strategy only works within the maildir directories; in other + directories, it behaves like *refuse*. + - *act-dir-delete-rest*: Like *act-dir*, but delete the remaining files. + + Note that the strategy has no effect on cross-account operations. Copying a + message across accounts will always copy a single file, arbitrarily chosen. + Moving a message across accounts will always copy a single file, arbitrarily + chosen, and refuse to delete multiple files from the source account. + # USAGE Notmuch shows slightly different behavior than for example imap. Some commands |