X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-maildir-fcc.el;h=07eedba22a33a28ae802f260781c3fbfdeeca582;hp=e67886853eeb341989191044241352100c08a56a;hb=0f066ece0f6aa7c02116f8ba3f06b5a005091678;hpb=22472d9def2f6525a9aac62e6481d8d4fa7db5d0 diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index e6788685..07eedba2 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -51,13 +51,13 @@ 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." - :require 'notmuch-fcc-initialization - :group 'notmuch :type '(choice (const :tag "No FCC header" nil) (string :tag "A single folder") (repeat :tag "A folder based on the From header" - (cons regexp (string :tag "Folder"))))) + (cons regexp (string :tag "Folder")))) + :require 'notmuch-fcc-initialization + :group 'notmuch-send) (defun notmuch-fcc-initialization () "If notmuch-fcc-directories is set, @@ -65,8 +65,8 @@ yet when sending a mail." ;; Set up the message-fcc-handler to move mails to the maildir in Fcc ;; The parameter is set to mark messages as "seen" (setq message-fcc-handler-function - '(lambda (destdir) - (notmuch-maildir-fcc-write-buffer-to-maildir destdir t))) + (lambda (destdir) + (notmuch-maildir-fcc-write-buffer-to-maildir destdir t))) ;; add a hook to actually insert the Fcc header when sending (add-hook 'message-header-setup-hook 'notmuch-fcc-header-setup)) @@ -131,22 +131,21 @@ will NOT be removed or replaced." (defun notmuch-maildir-fcc-host-fixer (hostname) (replace-regexp-in-string "/\\|:" - '(lambda (s) - (cond ((string-equal s "/") "\\057") - ((string-equal s ":") "\\072") - (t s))) + (lambda (s) + (cond ((string-equal s "/") "\\057") + ((string-equal s ":") "\\072") + (t s))) hostname t t)) (defun notmuch-maildir-fcc-make-uniq-maildir-id () - (let* ((ct (current-time)) - (timeid (+ (* (car ct) 65536) (cadr ct))) - (microseconds (car (cdr (cdr ct)))) + (let* ((ftime (float-time)) + (microseconds (mod (* 1000000 ftime) 1000000)) (hostname (notmuch-maildir-fcc-host-fixer system-name))) (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1)) (format "%d.%d_%d_%d.%s" - timeid + ftime (emacs-pid) microseconds notmuch-maildir-fcc-count