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 D3CCE431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 10:53:56 -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 Fq57R2QbM9S6 for <notmuch@notmuchmail.org>;
\r
16 Fri, 13 Jul 2012 10:53:56 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 371BC431FAE
\r
20 for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 10:53:56 -0700 (PDT)
\r
21 X-AuditID: 12074422-b7f1f6d00000090b-b9-500060b3768b
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id AC.E1.02315.3B060005; Fri, 13 Jul 2012 13:53:55 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6DHrswJ000707;
\r
27 Fri, 13 Jul 2012 13:53:55 -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 q6DHrr8D009890
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 13 Jul 2012 13:53:54 -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 1Spk3s-000866-Uu; Fri, 13 Jul 2012 13:53:53 -0400
\r
37 Date: Fri, 13 Jul 2012 13:53:52 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Mark Walters <markwalters1009@gmail.com>
\r
40 Subject: Re: [PATCH 7/7] emacs: Fix navigation of multi-line search result
\r
42 Message-ID: <20120713175352.GN7332@mit.edu>
\r
43 References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>
\r
44 <1342140319-19859-8-git-send-email-amdragon@mit.edu>
\r
45 <871ukfshjd.fsf@qmul.ac.uk>
\r
47 Content-Type: text/plain; charset=us-ascii
\r
48 Content-Disposition: inline
\r
49 In-Reply-To: <871ukfshjd.fsf@qmul.ac.uk>
\r
50 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
51 X-Brightmail-Tracker:
\r
52 H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IRYrdT192cwBBgsGqOisXquTwW12/OZHZg
\r
53 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mjo2fmcueCRaseXtfOYGxn7BLkZODgkBE4n5
\r
54 /04xQthiEhfurWcDsYUE9jFKXFsl0cXIBWRvYJS41NHKDOGcZJLYu3UBlLOEUaLlwRlmkBYW
\r
55 AVWJLTNWsIPYbAIaEtv2LwcbKyKgI3H70AKwOLOAtMS3381MXYwcHMICIRIrbnKDhHkFtCXW
\r
56 HfnNCjFzKqPElw6QGpCEoMTJmU9YIHq1JG78ewnWCzJn+T8OkDAn0Kp5vyaClYsKqEhMObmN
\r
57 bQKj0Cwk3bOQdM9C6F7AyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI11QvN7NELzWldBMjOKhd
\r
58 lHYw/jyodIhRgINRiYc32Z8hQIg1say4MvcQoyQHk5Ior2Y8UIgvKT+lMiOxOCO+qDQntfgQ
\r
59 owQHs5IIr44xUI43JbGyKrUoHyYlzcGiJM57LeWmv5BAemJJanZqakFqEUxWhoNDSYJXBhi9
\r
60 QoJFqempFWmZOSUIaSYOTpDhPEDDuUBqeIsLEnOLM9Mh8qcYdTmuPbx1i1GIJS8/L1VKnJcF
\r
61 pEgApCijNA9uDiwZvWIUB3pLmFcYpIoHmMjgJr0CWsIEtGTWz3/+QEtKEhFSUg2MVXuC6mPN
\r
62 eu/f8fFO1IiYfkbFzXeZk+29DzkmP/VNDu9Odn6wfubF7fs8l0eL35bt7/Ax2yNcMCH52J82
\r
63 bdu9Txe4FS1P/B4mu+fr6RNRsRmPJuxVanksHak2ffYdrUqdf2VteW+d7ZUtrSefNQ/tddlr
\r
64 vzJYfP3//HWzXv1b8nOBWUrhlPmeSizFGYmGWsxFxYkA6TFYVyEDAAA=
\r
65 Cc: notmuch@notmuchmail.org
\r
66 X-BeenThere: notmuch@notmuchmail.org
\r
67 X-Mailman-Version: 2.1.13
\r
69 List-Id: "Use and development of the notmuch mail system."
\r
70 <notmuch.notmuchmail.org>
\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
74 List-Post: <mailto:notmuch@notmuchmail.org>
\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
77 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
78 X-List-Received-Date: Fri, 13 Jul 2012 17:53:57 -0000
\r
80 Quoth Mark Walters on Jul 13 at 6:21 pm:
\r
81 > On Fri, 13 Jul 2012, Austin Clements <amdragon@MIT.EDU> wrote:
\r
82 > > At this point, the only remaining functions that don't support
\r
83 > > multi-line search result formats are the thread navigation functions.
\r
84 > > This patch fixes that by rewriting them in terms of
\r
85 > > notmuch-search-result-{beginning,end}.
\r
87 > This seems to subtly change the behaviour in the normal case of a single
\r
88 > line result. If point is not at the start of a search result then
\r
89 > notmuch-search-previous-thread moves to the start of the current thread
\r
90 > rather than the previous thread. Is that deliberate?
\r
92 > As far as I can see show uses p to move to the start of the previous
\r
93 > message so this behaviour is different from there as well.
\r
95 > I think your choice may be the nicest one (and actually even more so in
\r
96 > show) but thought I would mention it anyway.
\r
98 Oh, yes, that's true. I suppose that choice was deliberate in the
\r
99 sense that I wrote notmuch-search-previous-thread the way I thought it
\r
100 should work without thinking very hard about how it originally worked.
\r
102 I could rework it to keep the original behavior, or keep it this way
\r
103 and document it in the commit message (and maybe NEWS). Personally I
\r
104 would prefer to keep it this way and update show's p binding to behave
\r
105 similarly since I've always found show's p to be confusing.
\r
112 > > emacs/notmuch.el | 12 +++++++++---
\r
113 > > 1 file changed, 9 insertions(+), 3 deletions(-)
\r
115 > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
116 > > index f32cfb0..2ece97d 100644
\r
117 > > --- a/emacs/notmuch.el
\r
118 > > +++ b/emacs/notmuch.el
\r
119 > > @@ -287,18 +287,24 @@ For a mouse binding, return nil."
\r
120 > > (defun notmuch-search-next-thread ()
\r
121 > > "Select the next thread in the search results."
\r
123 > > - (forward-line 1))
\r
124 > > + (when (notmuch-search-get-result (notmuch-search-result-end))
\r
125 > > + (goto-char (notmuch-search-result-end))))
\r
127 > > (defun notmuch-search-previous-thread ()
\r
128 > > "Select the previous thread in the search results."
\r
130 > > - (forward-line -1))
\r
131 > > + (if (notmuch-search-get-result)
\r
132 > > + (unless (bobp)
\r
133 > > + (goto-char (notmuch-search-result-beginning (- (point) 1))))
\r
134 > > + ;; We must be past the end; jump to the last result
\r
135 > > + (notmuch-search-last-thread)))
\r
137 > > (defun notmuch-search-last-thread ()
\r
138 > > "Select the last thread in the search results."
\r
140 > > (goto-char (point-max))
\r
141 > > - (forward-line -2))
\r
142 > > + (forward-line -2)
\r
143 > > + (goto-char (notmuch-search-result-beginning)))
\r
145 > > (defun notmuch-search-first-thread ()
\r
146 > > "Select the first thread in the search results."
\r