1 Return-Path: <tomi.ollila@iki.fi>
\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 22B2B431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 26 Apr 2012 11:21:36 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 6JeSCHA8s4sl for <notmuch@notmuchmail.org>;
\r
16 Thu, 26 Apr 2012 11:21:34 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 54F14431FAE
\r
19 for <notmuch@notmuchmail.org>; Thu, 26 Apr 2012 11:21:34 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id EA45A68055; Thu, 26 Apr 2012 21:21:28 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
24 Subject: Re: [PATCH v2 1/2] emacs: add a filter option to show
\r
25 In-Reply-To: <1335373954-4578-2-git-send-email-markwalters1009@gmail.com>
\r
26 References: <1335373954-4578-1-git-send-email-markwalters1009@gmail.com>
\r
27 <1335373954-4578-2-git-send-email-markwalters1009@gmail.com>
\r
28 User-Agent: Notmuch/0.12+128~g512e176 (http://notmuchmail.org) Emacs/23.3.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Thu, 26 Apr 2012 21:21:28 +0300
\r
34 Message-ID: <m27gx2qrpz.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain; charset=us-ascii
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Thu, 26 Apr 2012 18:21:36 -0000
\r
51 On Wed, Apr 25 2012, Mark Walters <markwalters1009@gmail.com> wrote:
\r
53 > Show the current thread with a different filter (i.e., open messages
\r
54 > in the thread matching the new query).
\r
56 > Bound to 'l' for "limit".
\r
58 > Note that it is not the same as filter in search mode as it replaces
\r
59 > the existing query rather than ANDing with it (but it does keep the
\r
60 > thread-id part of the query).
\r
63 LGTM -- just one question -- to be analogous with 'notmuch-search-filter'
\r
64 'notmuch-show-filter-thread' could look something like:
\r
66 (defun notmuch-show-filter-thread (query)
\r
67 "Filter or LIMIT the current thread based on a new query string.
\r
69 Reshows the current thread with matches defined by the new query-string."
\r
70 (interactive (list (notmuch-read-query "Filter thread: ")))
\r
71 (setq notmuch-show-query-context (if (string= query "") nil query))
\r
72 (notmuch-show-refresh-view t))
\r
78 > emacs/notmuch-show.el | 12 ++++++++++++
\r
79 > 1 files changed, 12 insertions(+), 0 deletions(-)
\r
81 > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
82 > index 30b26d1..4b4d663 100644
\r
83 > --- a/emacs/notmuch-show.el
\r
84 > +++ b/emacs/notmuch-show.el
\r
86 > (declare-function notmuch-search-next-thread "notmuch" nil)
\r
87 > (declare-function notmuch-search-show-thread "notmuch" nil)
\r
88 > (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes))
\r
89 > +(declare-function notmuch-read-query "notmuch" (prompt))
\r
91 > (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")
\r
92 > "Headers that should be shown in a message, in this order.
\r
93 > @@ -1157,6 +1158,7 @@ reset based on the original query."
\r
94 > (define-key map "s" 'notmuch-search)
\r
95 > (define-key map "m" 'notmuch-mua-new-mail)
\r
96 > (define-key map "f" 'notmuch-show-forward-message)
\r
97 > + (define-key map "l" 'notmuch-show-filter-thread)
\r
98 > (define-key map "r" 'notmuch-show-reply-sender)
\r
99 > (define-key map "R" 'notmuch-show-reply)
\r
100 > (define-key map "|" 'notmuch-show-pipe-message)
\r
101 > @@ -1399,6 +1401,16 @@ current thread."
\r
102 > "Mark the current message as read."
\r
103 > (notmuch-show-tag-message "-unread"))
\r
105 > +(defun notmuch-show-filter-thread ()
\r
106 > + "Filter or LIMIT the current thread based on a new query string.
\r
108 > +Reshows the current thread with matches defined by the new query-string."
\r
110 > + (setq notmuch-show-query-context (notmuch-read-query "Filter thread: "))
\r
111 > + (when (string= notmuch-show-query-context "")
\r
112 > + (setq notmuch-show-query-context nil))
\r
113 > + (notmuch-show-refresh-view t))
\r
115 > ;; Functions for getting attributes of several messages in the current
\r
121 > _______________________________________________
\r
122 > notmuch mailing list
\r
123 > notmuch@notmuchmail.org
\r
124 > http://notmuchmail.org/mailman/listinfo/notmuch
\r