X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-maildir-fcc.el;h=ba22981c20af59f58d814e0b1d1f7f2fd9f650fc;hb=8b6f3e3f458c6ccca49100c5fb224af1aaa2b540;hp=8bb41a89a848a598d3adee37e059dd55e49cdd5d;hpb=65f2e61f28a0f5c5dc38dd3cf8a1de023934b330;p=obsolete%2Fnotmuch-old diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index 8bb41a89..ba22981c 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -18,6 +18,8 @@ (require 'message) +(require 'notmuch-lib) + (defvar notmuch-maildir-fcc-count 0) (defcustom notmuch-fcc-dirs nil @@ -43,10 +45,9 @@ used. The first entry is used as a default fallback when nothing else matches. - In all cases, the complete FCC directory will be constructed by - concatenating the content of the variable 'message-directory' - ('~/Mail/' by default and customizable via M-x - customize-variablemessage-directory) and this value. + In all cases, a relative FCC directory will be understood to + specify a directory within the notmuch mail store, (as set by + the database.path option in the notmuch configuration file). You will be prompted to create the directory if it does not exist yet when sending a mail. @@ -90,8 +91,9 @@ ;; if there is no fcc header yet, add ours (unless (message-fetch-field "fcc") (message-add-header (concat "Fcc: " - (file-name-as-directory message-directory) - subdir))) + (if (= (elt subdir 0) ?/) + subdir + (concat (notmuch-database-path) "/" subdir))))) ;; finally test if fcc points to a valid maildir (let ((fcc-header (message-fetch-field "fcc")))