1 Return-Path: <jrollins@finestructure.net>
\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 30C9C421192
\r
6 for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:35:14 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 KYbtbbXr4moX for <notmuch@notmuchmail.org>;
\r
16 Mon, 23 Jan 2012 00:35:13 -0800 (PST)
\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id A4943429E5B
\r
20 for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:35:13 -0800 (PST)
\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])
\r
22 by earth-doxen-postvirus (Postfix) with ESMTP id 061A766E00F2
\r
23 for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:35:10 -0800 (PST)
\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new
\r
25 Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com
\r
26 [76.174.137.84]) (Authenticated sender: jrollins)
\r
27 by earth-doxen-submit (Postfix) with ESMTP id 4327E66E017F
\r
28 for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 00:34:25 -0800 (PST)
\r
29 Received: by finestructure.net (Postfix, from userid 1000)
\r
30 id 591CCB9A; Mon, 23 Jan 2012 00:34:25 -0800 (PST)
\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>
\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
33 Subject: [PATCH 4/6] emacs: add option to notmuch-show-next-open-message to
\r
34 pop out to parent buffer if at end
\r
35 Date: Mon, 23 Jan 2012 00:34:23 -0800
\r
36 Message-Id: <1327307665-23387-4-git-send-email-jrollins@finestructure.net>
\r
37 X-Mailer: git-send-email 1.7.8.3
\r
38 In-Reply-To: <1327307665-23387-3-git-send-email-jrollins@finestructure.net>
\r
39 References: <87pqea24z0.fsf@servo.finestructure.net>
\r
40 <1327307665-23387-1-git-send-email-jrollins@finestructure.net>
\r
41 <1327307665-23387-2-git-send-email-jrollins@finestructure.net>
\r
42 <1327307665-23387-3-git-send-email-jrollins@finestructure.net>
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Mon, 23 Jan 2012 08:35:14 -0000
\r
57 This will allow for keybindings that achieve a smoother message
\r
58 processing flow by reducing the number of key presses needed for most
\r
61 emacs/notmuch-show.el | 14 ++++++++++----
\r
62 1 files changed, 10 insertions(+), 4 deletions(-)
\r
64 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
65 index fcd2878..fe7ec6a 100644
\r
66 --- a/emacs/notmuch-show.el
\r
67 +++ b/emacs/notmuch-show.el
\r
68 @@ -1373,17 +1373,23 @@ any effects from previous calls to
\r
69 (notmuch-show-mark-read)
\r
70 (notmuch-show-message-adjust))
\r
72 -(defun notmuch-show-next-open-message ()
\r
73 +(defun notmuch-show-next-open-message (&optional pop-at-end)
\r
74 "Show the next message."
\r
78 + (let ((parent-buffer notmuch-show-parent-buffer)
\r
80 (while (and (setq r (notmuch-show-goto-message-next))
\r
81 (not (notmuch-show-message-visible-p))))
\r
84 (notmuch-show-mark-read)
\r
85 (notmuch-show-message-adjust))
\r
86 - (goto-char (point-max)))))
\r
87 + (if (and parent-buffer pop-at-end)
\r
89 + (kill-this-buffer)
\r
90 + (switch-to-buffer parent-buffer)
\r
91 + (notmuch-search-next-message))
\r
92 + (goto-char (point-max))))))
\r
94 (defun notmuch-show-previous-open-message ()
\r
95 "Show the previous message."
\r