summaryrefslogtreecommitdiffhomepage
path: root/lib/net
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-13 01:19:48 +0100
committerjao <jao@gnu.org>2021-06-13 01:19:48 +0100
commitee1f7669953d1af534f282b2ef5ec147ecc090b3 (patch)
tree3b664ec1f89c9f6381a72bc7fa9aeb6f8aaa3314 /lib/net
parent78c612487485d53bf0b1fd86b3d3b356e1c2431a (diff)
downloadelibs-ee1f7669953d1af534f282b2ef5ec147ecc090b3.tar.gz
elibs-ee1f7669953d1af534f282b2ef5ec147ecc090b3.tar.bz2
jao-notmuch fixes
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/jao-notmuch.el8
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