1 Return-Path: <Sebastian@SSpaeth.de>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id D4AB1431FBC
\r
6 for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 04:12:47 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.15 tagged_above=-999 required=5 tests=[AWL=-0.040,
\r
12 BAYES_05=-1.11] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id rQFjKW8JqfoB for <notmuch@notmuchmail.org>;
\r
16 Wed, 17 Feb 2010 04:12:47 -0800 (PST)
\r
17 Received: from homiemail-a15.g.dreamhost.com (caiajhbdccah.dreamhost.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id E9F86431FAE
\r
20 for <notmuch@notmuchmail.org>; Wed, 17 Feb 2010 04:12:46 -0800 (PST)
\r
21 Received: from localhost.localdomain (mtec-hg-docking-1-dhcp-204.ethz.ch
\r
23 by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id A9BA476C06B;
\r
24 Wed, 17 Feb 2010 04:12:45 -0800 (PST)
\r
25 From: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
26 To: notmuch@notmuchmail.org
\r
27 Date: Wed, 17 Feb 2010 13:12:26 +0100
\r
28 Message-Id: <1266408746-28549-1-git-send-email-Sebastian@SSpaeth.de>
\r
29 X-Mailer: git-send-email 1.6.3.3
\r
30 In-Reply-To: <87sk90ragj.fsf@jhu.edu>
\r
31 References: <87sk90ragj.fsf@jhu.edu>
\r
32 Subject: [notmuch] [PATCH] notmuch.el: bind 'd' to new function
\r
33 notmuch-search-delete-thread-or-region
\r
34 X-BeenThere: notmuch@notmuchmail.org
\r
35 X-Mailman-Version: 2.1.13
\r
37 List-Id: "Use and development of the notmuch mail system."
\r
38 <notmuch.notmuchmail.org>
\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
42 List-Post: <mailto:notmuch@notmuchmail.org>
\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
46 X-List-Received-Date: Wed, 17 Feb 2010 12:12:48 -0000
\r
48 Create a new function notmuch-search-delete-thread-or region which does exactly what its name implies.
\r
50 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
52 This patch requires Jesse's patch from mail id:87sk90ragj.fsf@jhu.edu.
\r
54 Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
\r
56 notmuch.el | 11 +++++++++++
\r
57 1 files changed, 11 insertions(+), 0 deletions(-)
\r
59 diff --git a/notmuch.el b/notmuch.el
\r
60 index 7d9a82f..ac07ff3 100644
\r
63 @@ -1101,6 +1101,7 @@ matching this search term are shown if non-nil. "
\r
64 (define-key map [mouse-1] 'notmuch-search-show-thread)
\r
65 (define-key map "*" 'notmuch-search-operate-all)
\r
66 (define-key map "a" 'notmuch-search-archive-thread)
\r
67 + (define-key map "d" 'notmuch-search-delete-thread-or-region)
\r
68 (define-key map "-" 'notmuch-search-remove-tag)
\r
69 (define-key map "+" 'notmuch-search-add-tag)
\r
70 (define-key map (kbd "RET") 'notmuch-search-show-thread)
\r
71 @@ -1396,6 +1397,16 @@ This function advances the next thread when finished."
\r
72 (notmuch-search-remove-tag-thread "inbox")
\r
75 +(defun notmuch-search-delete-thread-or-region ()
\r
76 + "Delete the currently selected thread (tag \"+delete -inbox -unread\").
\r
78 +This function advances the next thread when finished."
\r
80 + (notmuch-search-add-tag "delete")
\r
81 + (notmuch-search-remove-tag "inbox")
\r
82 + (notmuch-search-remove-tag "unread")
\r
85 (defun notmuch-search-process-sentinel (proc msg)
\r
86 "Add a message to let user know when \"notmuch search\" exits"
\r
87 (let ((buffer (process-buffer proc))
\r