X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-maildir-fcc.el;h=d9a8f9b6c258d2ca3db3c37a85a31fb9bf8d988c;hb=80a90787163690d2d87571327ba504a470798c60;hp=ecb65e7a48e8bf92640759b586042129ef50ec36;hpb=24a7a10af2cbac0dadf45ffcdc59a8d84d6d4354;p=notmuch diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index ecb65e7a..d9a8f9b6 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -47,7 +47,6 @@ (defun notmuch-fcc-initialization () "If notmuch-fcc-directories is set, hook them into the message-fcc-handler-function" -(if (not (eq notmuch-fcc-dirs nil)) (progn ;Set up the message-fcc-handler to move mails to the maildir in Fcc ;The parameter is hardcoded to mark messages as "seen" (setq message-fcc-handler-function @@ -57,7 +56,7 @@ ;(preferrably we would use message-header-setup-up, but notmuch-reply ; munges headers after that is run, so it won't work for replies within ; notmuch) - (add-hook 'message-send-hook 'notmuch-fcc-header-setup)))) + (add-hook 'message-send-hook 'notmuch-fcc-header-setup)) (defun notmuch-fcc-header-setup () "Can be added to message-send-hook and will set the FCC header @@ -71,8 +70,8 @@ (cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t)))) (if (eq subdir nil) (setq subdir (car (car notmuch-fcc-dirs)))) (unless (message-fetch-field "fcc") - (message-add-header (concat "Fcc: " - (file-name-as-directory message-directory) + (message-add-header (concat "Fcc: " + (file-name-as-directory message-directory) subdir))) (let ((fcc-header (message-fetch-field "fcc"))) (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header) @@ -83,7 +82,7 @@ (notmuch-maildir-fcc-create-maildir fcc-header)) (t (error "Not sending message.")))))))) - + (defun notmuch-maildir-fcc-host-fixer (hostname) (replace-regexp-in-string "/\\|:" '(lambda (s) @@ -121,8 +120,6 @@ (error "%s is a file. Can't creat maildir." path)) (t (error "I don't know how to create a maildir here")))) - - (defun notmuch-maildir-fcc-save-buffer-to-tmp (destdir) "Returns the msg id of the message written to the temp directory