From 6141e8ba27a11a0aa2163b39bbeaae6492fbfbf1 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 17 Jun 2021 02:17:39 +0100 Subject: jao-notmuch: better marks for moved messages (seen, take 2) --- lib/net/jao-notmuch.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/net') 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)))) -- cgit v1.2.3