1 Return-Path: <amdragon@mit.edu>
\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 C0CC0431FAF
\r
6 for <notmuch@notmuchmail.org>; Tue, 24 Apr 2012 19:55:14 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 eLZfgDsWxdOE for <notmuch@notmuchmail.org>;
\r
16 Tue, 24 Apr 2012 19:55:10 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 84128431FAE
\r
20 for <notmuch@notmuchmail.org>; Tue, 24 Apr 2012 19:55:10 -0700 (PDT)
\r
21 X-AuditID: 12074425-b7f4a6d0000008e0-bb-4f97678d98be
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id C5.6C.02272.D87679F4; Tue, 24 Apr 2012 22:55:09 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q3P2t8DK008930;
\r
27 Tue, 24 Apr 2012 22:55:09 -0400
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q3P2t7rj000363
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Tue, 24 Apr 2012 22:55:07 -0400 (EDT)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1SMsNn-0007wX-0J; Tue, 24 Apr 2012 22:55:07 -0400
\r
37 Date: Tue, 24 Apr 2012 22:55:06 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Mark Walters <markwalters1009@gmail.com>
\r
40 Subject: Re: [PATCH] emacs: add a filter option to show
\r
41 Message-ID: <20120425025506.GM17810@mit.edu>
\r
42 References: <1335309421-18893-1-git-send-email-markwalters1009@gmail.com>
\r
44 Content-Type: text/plain; charset=us-ascii
\r
45 Content-Disposition: inline
\r
46 In-Reply-To: <1335309421-18893-1-git-send-email-markwalters1009@gmail.com>
\r
47 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IR4hRV1u1Nn+5vsGQ7r8XquTwW12/OZHZg
\r
50 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mr4838dSsEOsYk2HQwPjXKEuRk4OCQETie6v
\r
51 bWwQtpjEhXvrgWwuDiGBfYwSp1f/Y4RwNjBK9C9YxAThnGSS+DG/nxnCWcIoMW/uFSaQfhYB
\r
52 VYnt75rAZrEJaEhs27+cEcQWEdCRuH1oATuIzSwgLfHtdzNYvbCAucSF6X1g9bxANZ/WXAer
\r
53 ERLwlLi+ZQcLRFxQ4uTMJywQvVoSN/69BOrlAJuz/B8HiMkp4CUxaYImSIWogIrElJPb2CYw
\r
54 Cs1C0jwLSfMshOYFjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdC30cjNL9FJTSjcxgkKa3UV1
\r
55 B+OEQ0qHGAU4GJV4eGfvneYvxJpYVlyZe4hRkoNJSZT3ZOp0fyG+pPyUyozE4oz4otKc1OJD
\r
56 jBIczEoivEK3gMp5UxIrq1KL8mFS0hwsSuK8mlrv/IQE0hNLUrNTUwtSi2CyMhwcShK8v9KA
\r
57 hgoWpaanVqRl5pQgpJk4OEGG8wAN1wWmACHe4oLE3OLMdIj8KUZdjmtfjl5hFGLJy89LlRLn
\r
58 ZQUpEgApyijNg5sDS0WvGMWB3hLm/QSyjgeYxuAmvQJawgS05FsQyAfFJYkIKakGRsnXn7aW
\r
59 LrqvfXbilvmT+7fY6Lcv4Vp2QnJaS8ymtQcik5VEZstu7P130sIzmjNikneaJfNZTQ1NBj3p
\r
60 BYp18+v/xhtc5s7xniby9mf8qyWLH/l1Lj0dk3Xi3Vel16UqM1mP35nc8+6bJecDYTnPFqMn
\r
61 8nrHJctve62/e2DH/c+yp09vTEjcWq3EUpyRaKjFXFScCACD061ZIAMAAA==
\r
62 Cc: notmuch@notmuchmail.org
\r
63 X-BeenThere: notmuch@notmuchmail.org
\r
64 X-Mailman-Version: 2.1.13
\r
66 List-Id: "Use and development of the notmuch mail system."
\r
67 <notmuch.notmuchmail.org>
\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
71 List-Post: <mailto:notmuch@notmuchmail.org>
\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
75 X-List-Received-Date: Wed, 25 Apr 2012 02:55:14 -0000
\r
77 LGTM. I've been wanting this functionality for a while, but have been
\r
78 too lazy to implement it myself.
\r
80 I do have one request, though. Could we bind this to 'l' for "limit"?
\r
81 Generally we've been quite good at making the shift key a modifier to
\r
82 the functionality of the lower-case binding, which argues against 'F'.
\r
83 It would also make sense to switch away from 'f' for filtering
\r
84 (limiting) in search-view; 'f' is one of the few bindings that's used
\r
85 in both search and show mode with completely different meanings and
\r
86 'l' would be a good candidate for the related functionality in both
\r
89 Quoth Mark Walters on Apr 25 at 12:17 am:
\r
90 > Show the current thread with a different filter (i.e., open messages
\r
91 > in the thread matching the new query).
\r
93 > Currently bound to 'F'.
\r
95 > Note that it is not the same as filter in search as it replaces the
\r
96 > existing query rather than ANDing with it (but it does keep the
\r
97 > threadid part of the query).
\r
100 > I think filtering (i.e. refining current query) is not ideal as one
\r
101 > might want to remove some aspects of the query. Hence this patch
\r
102 > replaces the query-context.
\r
104 > Note does not fully work with excludes pending
\r
105 > id:"1331836090-30560-1-git-send-email-markwalters1009@gmail.com"
\r
111 > emacs/notmuch-show.el | 8 ++++++++
\r
112 > 1 files changed, 8 insertions(+), 0 deletions(-)
\r
114 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
115 > index 30b26d1..4a5b8b1 100644
\r
116 > --- a/emacs/notmuch-show.el
\r
117 > +++ b/emacs/notmuch-show.el
\r
118 > @@ -42,6 +42,7 @@
\r
119 > (declare-function notmuch-search-next-thread "notmuch" nil)
\r
120 > (declare-function notmuch-search-show-thread "notmuch" nil)
\r
121 > (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes))
\r
122 > +(declare-function notmuch-read-query "notmuch" (prompt))
\r
124 > (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")
\r
125 > "Headers that should be shown in a message, in this order.
\r
126 > @@ -1157,6 +1158,7 @@ reset based on the original query."
\r
127 > (define-key map "s" 'notmuch-search)
\r
128 > (define-key map "m" 'notmuch-mua-new-mail)
\r
129 > (define-key map "f" 'notmuch-show-forward-message)
\r
130 > + (define-key map "F" 'notmuch-show-filter-thread)
\r
131 > (define-key map "r" 'notmuch-show-reply-sender)
\r
132 > (define-key map "R" 'notmuch-show-reply)
\r
133 > (define-key map "|" 'notmuch-show-pipe-message)
\r
134 > @@ -1399,6 +1401,12 @@ current thread."
\r
135 > "Mark the current message as read."
\r
136 > (notmuch-show-tag-message "-unread"))
\r
138 > +(defun notmuch-show-filter-thread ()
\r
139 > + "Show the current thread with a different filter"
\r
141 > + (setq notmuch-show-query-context (notmuch-read-query "Filter thread: "))
\r
142 > + (notmuch-show-refresh-view t))
\r
144 > ;; Functions for getting attributes of several messages in the current
\r