[PATCH 0/6] Use notmuch insert for fcc
Mark Walters
markwalters1009 at gmail.com
Fri Jun 10 16:02:46 PDT 2016
This series allows the use of notmuch insert for fcc. It is rather
larger than I would like but I am fairly happy with the user
experience. A defcustom controls whether to use notmuch insert or file
fcc.
The syntax in the insert case is
Fcc: folder +tag1 -tag2
which inserts the message in folder, and +tag1 and -tag2 changes (if
present) are applied afterwards.
Since setting an fcc-header to "| notmuch insert --folder=sent"
essentially works, I will try to justify why the series ends this
big. The main reason is error handling: the pipe as above does no
error handling, so if the notmuch database is locked the fcc will be
silently lost. Unfortunately message-do-fcc which handles fcc is quite
inflexible and always passes full filename as fcc, which prevents the
syntax given above.
Thus to get this syntax we need to extract a local copy of
message-do-fcc which we simplify and rejig for our needs. The exact
rejigged form is in preparation for the postpone/resume/draft patches.
We could get rid of file fcc, but some people might still want it, and
it is used in the test suite, including by some non-emacs tests (via
emacs_fcc_message in test-lib.sh) so I am happier to keep it for now.
Best wishes
Mark
Mark Walters (6):
emacs: notmuch-check-exit-status bugfix
emacs: maildir-fcc: prepare for use of notmuch insert
emacs: maildir import message-do-fcc
emacs: simplify our local copy of message-do-fcc
Modify our local copy of message-do-fcc
emacs: maildir: add the actual insert code
emacs/notmuch-lib.el | 10 ++-
emacs/notmuch-maildir-fcc.el | 192 +++++++++++++++++++++++++++++++++++++------
emacs/notmuch-mua.el | 10 +--
test/test-lib.el | 5 ++
4 files changed, 185 insertions(+), 32 deletions(-)
--
2.1.4
More information about the notmuch
mailing list