[notmuch] [PATCH] notmuch.el: bind 'd' to new function notmuch-search-delete-thread...
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 17 Feb 2010 12:12:26 +0000 (13:12 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:13 +0000 (09:36 -0800)
09/9aecfdc345ba478f0ef17bfbcd2e2e8d2bb9b5 [new file with mode: 0644]

diff --git a/09/9aecfdc345ba478f0ef17bfbcd2e2e8d2bb9b5 b/09/9aecfdc345ba478f0ef17bfbcd2e2e8d2bb9b5
new file mode 100644 (file)
index 0000000..8ae371e
--- /dev/null
@@ -0,0 +1,90 @@
+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 D4AB1431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 04:12:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.15\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.15 tagged_above=-999 required=5 tests=[AWL=-0.040,\r
+       BAYES_05=-1.11] 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 rQFjKW8JqfoB for <notmuch@notmuchmail.org>;\r
+       Wed, 17 Feb 2010 04:12:47 -0800 (PST)\r
+Received: from homiemail-a15.g.dreamhost.com (caiajhbdccah.dreamhost.com\r
+       [208.97.132.207])\r
+       by olra.theworths.org (Postfix) with ESMTP id E9F86431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 04:12:46 -0800 (PST)\r
+Received: from localhost.localdomain (mtec-hg-docking-1-dhcp-204.ethz.ch\r
+       [129.132.133.204])\r
+       by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id A9BA476C06B; \r
+       Wed, 17 Feb 2010 04:12:45 -0800 (PST)\r
+From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+To: notmuch@notmuchmail.org\r
+Date: Wed, 17 Feb 2010 13:12:26 +0100\r
+Message-Id: <1266408746-28549-1-git-send-email-Sebastian@SSpaeth.de>\r
+X-Mailer: git-send-email 1.6.3.3\r
+In-Reply-To: <87sk90ragj.fsf@jhu.edu>\r
+References: <87sk90ragj.fsf@jhu.edu>\r
+Subject: [notmuch] [PATCH] notmuch.el: bind 'd' to new function\r
+       notmuch-search-delete-thread-or-region\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, 17 Feb 2010 12:12:48 -0000\r
+\r
+Create a new function notmuch-search-delete-thread-or region which does exactly what its name implies.\r
+\r
+Hitting 'd' will delete the current thread (or multiple threads if you marked a region). Deleting means adding tag 'delete' and removing tags 'unread' and 'inbox' in this case.\r
+\r
+This patch requires Jesse's patch from mail id:87sk90ragj.fsf@jhu.edu.\r
+\r
+Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+---\r
+ notmuch.el |   11 +++++++++++\r
+ 1 files changed, 11 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index 7d9a82f..ac07ff3 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -1101,6 +1101,7 @@ matching this search term are shown if non-nil. "\r
+     (define-key map [mouse-1] 'notmuch-search-show-thread)\r
+     (define-key map "*" 'notmuch-search-operate-all)\r
+     (define-key map "a" 'notmuch-search-archive-thread)\r
++    (define-key map "d" 'notmuch-search-delete-thread-or-region)\r
+     (define-key map "-" 'notmuch-search-remove-tag)\r
+     (define-key map "+" 'notmuch-search-add-tag)\r
+     (define-key map (kbd "RET") 'notmuch-search-show-thread)\r
+@@ -1396,6 +1397,16 @@ This function advances the next thread when finished."\r
+   (notmuch-search-remove-tag-thread "inbox")\r
+   (forward-line))\r
\r
++(defun notmuch-search-delete-thread-or-region ()\r
++  "Delete the currently selected thread (tag \"+delete -inbox -unread\").\r
++\r
++This function advances the next thread when finished."\r
++  (interactive)\r
++  (notmuch-search-add-tag "delete")\r
++  (notmuch-search-remove-tag "inbox")\r
++  (notmuch-search-remove-tag "unread")\r
++  (forward-line))\r
++\r
+ (defun notmuch-search-process-sentinel (proc msg)\r
+   "Add a message to let user know when \"notmuch search\" exits"\r
+   (let ((buffer (process-buffer proc))\r
+-- \r
+1.6.3.3\r
+\r