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 8DBBF41ED71
\r
6 for <notmuch@notmuchmail.org>; Thu, 12 Jul 2012 17:45:36 -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 GHvV6l6-yN9r for <notmuch@notmuchmail.org>;
\r
16 Thu, 12 Jul 2012 17:45:34 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 7802741ED72
\r
20 for <notmuch@notmuchmail.org>; Thu, 12 Jul 2012 17:45:30 -0700 (PDT)
\r
21 X-AuditID: 1209190f-b7f306d0000008b4-9e-4fff6faa0fe2
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id D5.91.02228.AAF6FFF4; Thu, 12 Jul 2012 20:45:30 -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 q6D0jUS9021131;
\r
27 Thu, 12 Jul 2012 20:45:30 -0400
\r
28 Received: from drake.dyndns.org
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6D0jSIP010706
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Thu, 12 Jul 2012 20:45:29 -0400 (EDT)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1SpU0e-0005SE-O7; Thu, 12 Jul 2012 20:45:28 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 7/7] emacs: Fix navigation of multi-line search result formats
\r
41 Date: Thu, 12 Jul 2012 20:45:19 -0400
\r
42 Message-Id: <1342140319-19859-8-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10
\r
44 In-Reply-To: <1342140319-19859-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1342140319-19859-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsUixG6nrrsq/7+/Qet0YYvrN2cyOzB6PFt1
\r
48 izmAMYrLJiU1J7MstUjfLoErY/WEFraC7dwVk/4uZ2lgXM3ZxcjJISFgIjHvyTdGCFtM4sK9
\r
49 9WxdjFwcQgL7GCU2bH4C5WxglOic1MEC4Txikuj9tIUVwpnLKDF17VY2kH42AQ2JbfuXg80S
\r
50 EZCW2Hl3NlARBwezgJrEny4VkLCwgJ/EjM/7wEpYBFQl5h2/yAJi8wo4SKz+PpMd4gx5iaf3
\r
51 +8BGcgo4Smz4coEVxBYCqmk8NpN5AiP/AkaGVYyyKblVurmJmTnFqcm6xcmJeXmpRbomermZ
\r
52 JXqpKaWbGEFhwynJv4Px20GlQ4wCHIxKPLy/Y//7C7EmlhVX5h5ilORgUhLldckGCvEl5adU
\r
53 ZiQWZ8QXleakFh9ilOBgVhLhXWcPlONNSaysSi3Kh0lJc7AoifNeTbnpLySQnliSmp2aWpBa
\r
54 BJOV4eBQkuDlBMaHkGBRanpqRVpmTglCmomDE2Q4D9DwbXkgw4sLEnOLM9Mh8qcYFaXEeS+A
\r
55 JARAEhmleXC9sLh+xSgO9Iow706QKh5gSoDrfgU0mAlo8Kyf/0AGlyQipKQaGJ0U5fj3nft+
\r
56 IbKG03UVe6/Cl8a/Z5ZHRISXBTr9fSPu8ZvdJDrl3Laig48Ef5jo593rjIubc7uh/rnVXfdL
\r
57 x3ty8v8e3zb9xI2jR0KXb1F4sbbj4YFg9obJh3yn7Z+Tw+IcuXNZcqnUygVGS+8lbbTYJxUz
\r
58 aebV440nGtb07J+VkVcdprD7SoISS3FGoqEWc1FxIgBHHS6TxgIAAA==
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Fri, 13 Jul 2012 00:45:37 -0000
\r
73 At this point, the only remaining functions that don't support
\r
74 multi-line search result formats are the thread navigation functions.
\r
75 This patch fixes that by rewriting them in terms of
\r
76 notmuch-search-result-{beginning,end}.
\r
78 emacs/notmuch.el | 12 +++++++++---
\r
79 1 file changed, 9 insertions(+), 3 deletions(-)
\r
81 diff --git a/emacs/notmuch.el b/emacs/notmuch.el
\r
82 index f32cfb0..2ece97d 100644
\r
83 --- a/emacs/notmuch.el
\r
84 +++ b/emacs/notmuch.el
\r
85 @@ -287,18 +287,24 @@ For a mouse binding, return nil."
\r
86 (defun notmuch-search-next-thread ()
\r
87 "Select the next thread in the search results."
\r
90 + (when (notmuch-search-get-result (notmuch-search-result-end))
\r
91 + (goto-char (notmuch-search-result-end))))
\r
93 (defun notmuch-search-previous-thread ()
\r
94 "Select the previous thread in the search results."
\r
96 - (forward-line -1))
\r
97 + (if (notmuch-search-get-result)
\r
99 + (goto-char (notmuch-search-result-beginning (- (point) 1))))
\r
100 + ;; We must be past the end; jump to the last result
\r
101 + (notmuch-search-last-thread)))
\r
103 (defun notmuch-search-last-thread ()
\r
104 "Select the last thread in the search results."
\r
106 (goto-char (point-max))
\r
107 - (forward-line -2))
\r
108 + (forward-line -2)
\r
109 + (goto-char (notmuch-search-result-beginning)))
\r
111 (defun notmuch-search-first-thread ()
\r
112 "Select the first thread in the search results."
\r