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 29DE5429E33
\r
6 for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 20:47:54 -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 gdqDqO7rL1Jq for <notmuch@notmuchmail.org>;
\r
16 Fri, 13 Jul 2012 20:47:53 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 948D1431FC3
\r
20 for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 20:47:53 -0700 (PDT)
\r
21 X-AuditID: 1209190d-b7fd56d000000933-f2-5000ebe98422
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id F4.99.02355.9EBE0005; Fri, 13 Jul 2012 23:47:53 -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 q6E3lqWH027226;
\r
27 Fri, 13 Jul 2012 23:47:52 -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 q6E3lpNc022354
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Fri, 13 Jul 2012 23:47:52 -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 1SptKh-0000ow-FK; Fri, 13 Jul 2012 23:47:51 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH] emacs: Make moving to the previous message move to the
\r
42 Date: Fri, 13 Jul 2012 23:47:48 -0400
\r
43 Message-Id: <1342237668-2489-1-git-send-email-amdragon@mit.edu>
\r
44 X-Mailer: git-send-email 1.7.10
\r
45 X-Brightmail-Tracker:
\r
46 H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsUixG6nrvvyNUOAwduVXBar5/JYXL85k9mB
\r
47 yWPnrLvsHs9W3WIOYIrisklJzcksSy3St0vgyjiwWbbgHX/Fx9/bWBsYJ/B2MXJwSAiYSMye
\r
48 pNDFyAlkiklcuLeerYuRi0NIYB+jxPz9DYwQzgZGiTU/m6Ayj5gkts/dzQzhzGWUmL12DTtI
\r
49 P5uAhsS2/csZQWwRAWmJnXdns4LYzAKOEp/3L2IDsYUFIiXe/G5hBrFZBFQlZt5bBmbzCthL
\r
50 7Ji8jgniDnmJp/f72CYw8i5gZFjFKJuSW6Wbm5iZU5yarFucnJiXl1qka6SXm1mil5pSuokR
\r
51 FBackrw7GN8dVDrEKMDBqMTDm+rPECDEmlhWXJl7iFGSg0lJlJf3FVCILyk/pTIjsTgjvqg0
\r
52 J7X4EKMEB7OSCK95G1CONyWxsiq1KB8mJc3BoiTOeyXlpr+QQHpiSWp2ampBahFMVoaDQ0mC
\r
53 lxkY/kKCRanpqRVpmTklCGkmDk6Q4TxAw91AaniLCxJzizPTIfKnGBWlxHkLQRICIImM0jy4
\r
54 XljcvmIUB3pFmDcDpIoHGPNw3a+ABjMBDZ71858/0OCSRISUVANjb7KiKM9RR8UHvGHtSa4b
\r
55 VD63FyWyPkyffHhl12G/sCecN6y+Vhk98dPln1AVHe21ykf8+i6B14u8Ex6qOrZ8kpr0SeW3
\r
56 ae2qJ9tzRB682fyzgOnFH4YVr5n+b+qe2sZ/1d3vXr+/tKBP+Xrzl+uXPy/grpR+wXpXwn7f
\r
57 5G4vkdD7GeVu6RJKLMUZiYZazEXFiQDDujJptgIAAA==
\r
58 X-BeenThere: notmuch@notmuchmail.org
\r
59 X-Mailman-Version: 2.1.13
\r
61 List-Id: "Use and development of the notmuch mail system."
\r
62 <notmuch.notmuchmail.org>
\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
66 List-Post: <mailto:notmuch@notmuchmail.org>
\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
70 X-List-Received-Date: Sat, 14 Jul 2012 03:47:54 -0000
\r
72 Previously, notmuch-show-previous-message would move to the beginning
\r
73 of the message before the message containing point. This patch makes
\r
74 it instead move to the previous message *boundary*. That is, if point
\r
75 isn't already at the beginning of the message, it moves to the
\r
76 beginning of the current message. This is consistent with
\r
77 notmuch-show-next-message, which can be thought of as moving to the
\r
78 next message boundary. Several people have expressed a preference for
\r
82 This patch accompanies the series in [0] (though they're independent
\r
83 and can be applied in either order). This makes the behavior of 'p'
\r
84 and 'P' in show-mode conceptually similar to the new behavior of 'p'
\r
87 [0] 1342140319-19859-1-git-send-email-amdragon@mit.edu
\r
89 emacs/notmuch-show.el | 10 +++++++---
\r
90 1 file changed, 7 insertions(+), 3 deletions(-)
\r
92 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
93 index 6335d45..02e319f 100644
\r
94 --- a/emacs/notmuch-show.el
\r
95 +++ b/emacs/notmuch-show.el
\r
96 @@ -1525,9 +1525,11 @@ thread, navigate to the next thread in the parent search buffer."
\r
97 (goto-char (point-max)))))
\r
99 (defun notmuch-show-previous-message ()
\r
100 - "Show the previous message."
\r
101 + "Show the previous message or the start of the current message."
\r
103 - (notmuch-show-goto-message-previous)
\r
104 + (if (= (point) (notmuch-show-message-top))
\r
105 + (notmuch-show-goto-message-previous)
\r
106 + (notmuch-show-move-to-message-top))
\r
107 (notmuch-show-mark-read)
\r
108 (notmuch-show-message-adjust))
\r
110 @@ -1587,7 +1589,9 @@ to show, nil otherwise."
\r
111 (defun notmuch-show-previous-open-message ()
\r
112 "Show the previous open message."
\r
114 - (while (and (notmuch-show-goto-message-previous)
\r
115 + (while (and (if (= (point) (notmuch-show-message-top))
\r
116 + (notmuch-show-goto-message-previous)
\r
117 + (notmuch-show-move-to-message-top))
\r
118 (not (notmuch-show-message-visible-p))))
\r
119 (notmuch-show-mark-read)
\r
120 (notmuch-show-message-adjust))
\r