diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/jao-notmuch.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index fd2694f..85c241e 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -49,17 +49,17 @@ (prop-match-value p) (user-error "No message at point"))) -(defun jao-notmuch--move (full-path &optional d) +(defun jao-notmuch--move (full-path &optional d seen) (let* ((ff (jao-notmuch--path-to-mailbox full-path)) (d (or d (completing-read (format "From %s to: " ff) (remove ff jao-notmuch-mailboxes) nil t))) (dest (string-replace ff d full-path)) - (dest (replace-regexp-in-string ",U=.+$" "" dest)) + (dest (replace-regexp-in-string ",U=.+$" (if seen "m,S" "m") dest)) (fnd (file-name-nondirectory full-path)) (dnd (file-name-nondirectory dest))) (when (y-or-n-p (format "%s/%s -> %s/%s? " ff fnd d dnd)) (notmuch-tree-tag (append (notmuch-tag-change-list (split-string ff "/") t) - (split-string d "/"))) + (notmuch-tag-change-list (split-string d "/")))) (notmuch-tree-close-message-window) (rename-file full-path dest) (shell-command-to-string "notmuch new") @@ -79,7 +79,7 @@ (f (car (plist-get p :filename))) (mbox (car (split-string (jao-notmuch--path-to-mailbox f) "/")))) (notmuch-tree-tag '("-new" "-unread")) - (jao-notmuch--move f (concat mbox "/spam")))) + (jao-notmuch--move f (concat mbox "/spam") t))) ;; Targetting the displayed message from the tree view |