[notmuch] [PATCH] add notmuch-show-delete keybinding 'd'

racin at free.fr racin at free.fr
Wed Jan 20 02:56:07 PST 2010


Hi Sebastian,

I posted a similar patch a while ago, that also did not show deleted messages by default. Don't know if Carl wants to 
integrate this though

Matthieu

----- Mail Original -----
De: "Sebastian Spaeth" <Sebastian at SSpaeth.de>
À: "notmuch" <notmuch at notmuchmail.org>
Envoyé: Mercredi 20 Janvier 2010 10h32:10 GMT +00:00 GMT - Grande-Bretagne, Irlande, Portugal
Objet: [notmuch] [PATCH] add notmuch-show-delete keybinding 'd'

It adds a tag 'delete' and removes the tags 'inbox' and 'unread'.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 notmuch.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index 97914f2..ff930c9 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -63,6 +63,7 @@
     (define-key map "m" 'message-mail)
     (define-key map "f" 'notmuch-show-forward-current)
     (define-key map "r" 'notmuch-show-reply)
+    (define-key map "d" 'notmuch-show-delete)
     (define-key map "|" 'notmuch-show-pipe-message)
     (define-key map "w" 'notmuch-show-save-attachments)
     (define-key map "V" 'notmuch-show-view-raw-message)
@@ -369,6 +370,13 @@ buffer."
   (let ((message-id (notmuch-show-get-message-id)))
     (notmuch-reply message-id)))
 
+(defun notmuch-show-delete ()
+  "'delete' current mail and remove 'unread' 'inbox'"
+  (interactive)
+  (notmuch-show-add-tag "delete")
+  (notmuch-show-remove-tag "unread")
+  (notmuch-show-remove-tag "inbox"))
+
 (defun notmuch-show-forward-current ()
   "Forward the current message."
   (interactive)
-- 
1.6.3.3

_______________________________________________
notmuch mailing list
notmuch at notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list