1 Return-Path: <dme@dme.org>
\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 788504196F2
\r
6 for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 04:20:28 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 dHwulUvdu0qB for <notmuch@notmuchmail.org>;
\r
16 Thu, 22 Apr 2010 04:20:25 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id D9FF4431FC1
\r
20 for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 04:20:24 -0700 (PDT)
\r
21 Received: by wyf23 with SMTP id 23so617419wyf.26
\r
22 for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 04:20:24 -0700 (PDT)
\r
23 Received: by 10.216.160.132 with SMTP id u4mr8485268wek.19.1271935222800;
\r
24 Thu, 22 Apr 2010 04:20:22 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (gmp-ea-fw-1.sun.com [192.18.1.36])
\r
26 by mx.google.com with ESMTPS id x14sm74956795wbs.6.2010.04.22.04.20.21
\r
27 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
28 Thu, 22 Apr 2010 04:20:22 -0700 (PDT)
\r
29 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
30 id 73D78594163; Thu, 22 Apr 2010 12:20:21 +0100 (BST)
\r
31 From: David Edmondson <dme@dme.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH] emacs: Push the cursor to point-max on `n' or `N' at the end
\r
35 Date: Thu, 22 Apr 2010 12:20:16 +0100
\r
36 Message-Id: <1271935216-14692-1-git-send-email-dme@dme.org>
\r
37 X-Mailer: git-send-email 1.7.0
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Thu, 22 Apr 2010 11:20:28 -0000
\r
52 Sebastian pointed out that the pre-JSON UI would move the cursor to
\r
53 the end of the buffer if `n' or `N' is hit when on the last (unread)
\r
54 message. Mimic that behaviour in the new UI.
\r
56 emacs/notmuch-show.el | 20 +++++++++++++-------
\r
57 1 files changed, 13 insertions(+), 7 deletions(-)
\r
59 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
60 index 379e344..d01bf36 100644
\r
61 --- a/emacs/notmuch-show.el
\r
62 +++ b/emacs/notmuch-show.el
\r
63 @@ -816,9 +816,11 @@ any effects from previous calls to
\r
64 (defun notmuch-show-next-message ()
\r
65 "Show the next message."
\r
67 - (notmuch-show-goto-message-next)
\r
68 - (notmuch-show-mark-read)
\r
69 - (notmuch-show-message-adjust))
\r
70 + (if (notmuch-show-goto-message-next)
\r
72 + (notmuch-show-mark-read)
\r
73 + (notmuch-show-message-adjust))
\r
74 + (goto-char (point-max))))
\r
76 (defun notmuch-show-previous-message ()
\r
77 "Show the previous message."
\r
78 @@ -830,10 +832,14 @@ any effects from previous calls to
\r
79 (defun notmuch-show-next-open-message ()
\r
80 "Show the next message."
\r
82 - (while (and (notmuch-show-goto-message-next)
\r
83 - (not (notmuch-show-message-visible-p))))
\r
84 - (notmuch-show-mark-read)
\r
85 - (notmuch-show-message-adjust))
\r
87 + (while (and (setq r (notmuch-show-goto-message-next))
\r
88 + (not (notmuch-show-message-visible-p))))
\r
91 + (notmuch-show-mark-read)
\r
92 + (notmuch-show-message-adjust))
\r
93 + (goto-char (point-max)))))
\r
95 (defun notmuch-show-previous-open-message ()
\r
96 "Show the previous message."
\r