1 Return-Path: <m.walters@qmul.ac.uk>
\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 AD305431FB6
\r
6 for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 10:22:09 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5
\r
12 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
\r
13 NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id XDY44YB2jNyv for <notmuch@notmuchmail.org>;
\r
17 Fri, 13 Jul 2012 10:22:09 -0700 (PDT)
\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])
\r
19 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 1488F431FAE
\r
22 for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 10:22:09 -0700 (PDT)
\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])
\r
24 by mail2.qmul.ac.uk with esmtp (Exim 4.71)
\r
25 (envelope-from <m.walters@qmul.ac.uk>)
\r
26 id 1SpjZ2-0003WR-Nd; Fri, 13 Jul 2012 18:22:04 +0100
\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]
\r
29 by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)
\r
30 (envelope-from <m.walters@qmul.ac.uk>)
\r
31 id 1SpjZ2-0003hL-FL; Fri, 13 Jul 2012 18:22:00 +0100
\r
32 From: Mark Walters <markwalters1009@gmail.com>
\r
33 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
34 Subject: Re: [PATCH 7/7] emacs: Fix navigation of multi-line search result
\r
36 In-Reply-To: <1342140319-19859-8-git-send-email-amdragon@mit.edu>
\r
37 References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>
\r
38 <1342140319-19859-8-git-send-email-amdragon@mit.edu>
\r
39 User-Agent: Notmuch/0.13.2+63~g1397edd (http://notmuchmail.org) Emacs/23.4.1
\r
40 (x86_64-pc-linux-gnu)
\r
41 Date: Fri, 13 Jul 2012 18:21:58 +0100
\r
42 Message-ID: <871ukfshjd.fsf@qmul.ac.uk>
\r
44 Content-Type: text/plain; charset=us-ascii
\r
45 X-Sender-Host-Address: 94.192.233.223
\r
46 X-QM-SPAM-Info: Sender has good ham record. :)
\r
47 X-QM-Body-MD5: 02f16b50efaf1167b85a10dfcd0ddbfe (of first 20000 bytes)
\r
48 X-SpamAssassin-Score: -1.8
\r
49 X-SpamAssassin-SpamBar: -
\r
50 X-SpamAssassin-Report: The QM spam filters have analysed this message to
\r
52 spam. We require at least 5.0 points to mark a message as spam.
\r
53 This message scored -1.8 points.
\r
54 Summary of the scoring:
\r
55 * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,
\r
57 * [138.37.6.40 listed in list.dnswl.org]
\r
58 * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
\r
59 provider * (markwalters1009[at]gmail.com)
\r
60 * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
\r
62 * 0.5 AWL AWL: From: address is in the auto white-list
\r
63 X-QM-Scan-Virus: ClamAV says the message is clean
\r
64 X-BeenThere: notmuch@notmuchmail.org
\r
65 X-Mailman-Version: 2.1.13
\r
67 List-Id: "Use and development of the notmuch mail system."
\r
68 <notmuch.notmuchmail.org>
\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
72 List-Post: <mailto:notmuch@notmuchmail.org>
\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
75 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
76 X-List-Received-Date: Fri, 13 Jul 2012 17:22:09 -0000
\r
78 On Fri, 13 Jul 2012, Austin Clements <amdragon@MIT.EDU> wrote:
\r
79 > At this point, the only remaining functions that don't support
\r
80 > multi-line search result formats are the thread navigation functions.
\r
81 > This patch fixes that by rewriting them in terms of
\r
82 > notmuch-search-result-{beginning,end}.
\r
84 This seems to subtly change the behaviour in the normal case of a single
\r
85 line result. If point is not at the start of a search result then
\r
86 notmuch-search-previous-thread moves to the start of the current thread
\r
87 rather than the previous thread. Is that deliberate?
\r
89 As far as I can see show uses p to move to the start of the previous
\r
90 message so this behaviour is different from there as well.
\r
92 I think your choice may be the nicest one (and actually even more so in
\r
93 show) but thought I would mention it anyway.
\r
100 > emacs/notmuch.el | 12 +++++++++---
\r
101 > 1 file changed, 9 insertions(+), 3 deletions(-)
\r
103 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
104 > index f32cfb0..2ece97d 100644
\r
105 > --- a/emacs/notmuch.el
\r
106 > +++ b/emacs/notmuch.el
\r
107 > @@ -287,18 +287,24 @@ For a mouse binding, return nil."
\r
108 > (defun notmuch-search-next-thread ()
\r
109 > "Select the next thread in the search results."
\r
111 > - (forward-line 1))
\r
112 > + (when (notmuch-search-get-result (notmuch-search-result-end))
\r
113 > + (goto-char (notmuch-search-result-end))))
\r
115 > (defun notmuch-search-previous-thread ()
\r
116 > "Select the previous thread in the search results."
\r
118 > - (forward-line -1))
\r
119 > + (if (notmuch-search-get-result)
\r
121 > + (goto-char (notmuch-search-result-beginning (- (point) 1))))
\r
122 > + ;; We must be past the end; jump to the last result
\r
123 > + (notmuch-search-last-thread)))
\r
125 > (defun notmuch-search-last-thread ()
\r
126 > "Select the last thread in the search results."
\r
128 > (goto-char (point-max))
\r
129 > - (forward-line -2))
\r
130 > + (forward-line -2)
\r
131 > + (goto-char (notmuch-search-result-beginning)))
\r
133 > (defun notmuch-search-first-thread ()
\r
134 > "Select the first thread in the search results."
\r
138 > _______________________________________________
\r
139 > notmuch mailing list
\r
140 > notmuch@notmuchmail.org
\r
141 > http://notmuchmail.org/mailman/listinfo/notmuch
\r