[notmuch] [PATCH] add notmuch-show-delete keybinding 'd'
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 20 Jan 2010 10:32:10 +0000 (11:32 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:00 +0000 (09:36 -0800)
1f/6887158bb28d5d67a4a9b6c7dc77bc30c84c8e [new file with mode: 0644]

diff --git a/1f/6887158bb28d5d67a4a9b6c7dc77bc30c84c8e b/1f/6887158bb28d5d67a4a9b6c7dc77bc30c84c8e
new file mode 100644 (file)
index 0000000..fbb7647
--- /dev/null
@@ -0,0 +1,80 @@
+Return-Path: <Sebastian@SSpaeth.de>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 7981D431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 20 Jan 2010 02:32:18 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.413\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.413 tagged_above=-999 required=5\r
+       tests=[AWL=-0.228, BAYES_40=-0.185] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 7UdMuvYBgMjU for <notmuch@notmuchmail.org>;\r
+       Wed, 20 Jan 2010 02:32:17 -0800 (PST)\r
+Received: from homiemail-a24.g.dreamhost.com (caiajhbdcbhh.dreamhost.com\r
+       [208.97.132.177])\r
+       by olra.theworths.org (Postfix) with ESMTP id A7010431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 20 Jan 2010 02:32:17 -0800 (PST)\r
+Received: from localhost.localdomain (mtec-hg-docking-2-dhcp-062.ethz.ch\r
+       [82.130.121.62])\r
+       by homiemail-a24.g.dreamhost.com (Postfix) with ESMTPA id 386EC2C806D; \r
+       Wed, 20 Jan 2010 02:32:15 -0800 (PST)\r
+From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+To: notmuch <notmuch@notmuchmail.org>\r
+Date: Wed, 20 Jan 2010 11:32:10 +0100\r
+Message-Id: <1263983530-5588-1-git-send-email-Sebastian@SSpaeth.de>\r
+X-Mailer: git-send-email 1.6.3.3\r
+Subject: [notmuch] [PATCH] add notmuch-show-delete keybinding 'd'\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 20 Jan 2010 10:32:18 -0000\r
+\r
+It adds a tag 'delete' and removes the tags 'inbox' and 'unread'.\r
+\r
+Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+---\r
+ notmuch.el |    8 ++++++++\r
+ 1 files changed, 8 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 97914f2..ff930c9 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -63,6 +63,7 @@\r
+     (define-key map "m" 'message-mail)\r
+     (define-key map "f" 'notmuch-show-forward-current)\r
+     (define-key map "r" 'notmuch-show-reply)\r
++    (define-key map "d" 'notmuch-show-delete)\r
+     (define-key map "|" 'notmuch-show-pipe-message)\r
+     (define-key map "w" 'notmuch-show-save-attachments)\r
+     (define-key map "V" 'notmuch-show-view-raw-message)\r
+@@ -369,6 +370,13 @@ buffer."\r
+   (let ((message-id (notmuch-show-get-message-id)))\r
+     (notmuch-reply message-id)))\r
\r
++(defun notmuch-show-delete ()\r
++  "'delete' current mail and remove 'unread' 'inbox'"\r
++  (interactive)\r
++  (notmuch-show-add-tag "delete")\r
++  (notmuch-show-remove-tag "unread")\r
++  (notmuch-show-remove-tag "inbox"))\r
++\r
+ (defun notmuch-show-forward-current ()\r
+   "Forward the current message."\r
+   (interactive)\r
+-- \r
+1.6.3.3\r
+\r