diff options
author | jao <jao@gnu.org> | 2021-06-17 02:17:39 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-06-17 02:17:39 +0100 |
commit | 6141e8ba27a11a0aa2163b39bbeaae6492fbfbf1 (patch) | |
tree | 1689cfab3e0d71962b94b91bf3b9ec0791458124 /lib | |
parent | 0ab30792407cef308d6ae4b287541b675efe3bd6 (diff) | |
download | elibs-6141e8ba27a11a0aa2163b39bbeaae6492fbfbf1.tar.gz elibs-6141e8ba27a11a0aa2163b39bbeaae6492fbfbf1.tar.bz2 |
jao-notmuch: better marks for moved messages (seen, take 2)
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 de1885f..4ca8573 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -53,20 +53,20 @@ (defun jao-notmuch--full-path () (seq-find #'file-exists-p (plist-get (jao-notmuch--msg-props) :filename))) -(defun jao-notmuch--move (&optional full-path d seen) +(defun jao-notmuch--move (&optional full-path d) (let* ((full-path (or full-path (jao-notmuch--full-path))) (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=.+$" (if seen "m,S" "m") dest)) + (dest (replace-regexp-in-string ",U=.+$" "m:2,S" dest)) (ftags (split-string ff "/")) (ttags (split-string d "/"))) (when (y-or-n-p (format "%s -> %s? " ftags ttags)) + (notmuch-tree-close-message-window) (notmuch-tree-tag (append (notmuch-tag-change-list ftags t) (notmuch-tag-change-list ttags))) - (notmuch-tree-close-message-window) - (rename-file full-path dest) + (rename-file (jao-notmuch--full-path) dest) (shell-command-to-string "notmuch new") (notmuch-refresh-this-buffer)))) |