Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f6 / e708a2416ec2cb74a684e8fd3a9ac4ff9cb7ff
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 8AE9C40F239\r
6         for <notmuch@notmuchmail.org>; Sat,  7 Jan 2012 17:27:01 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.3\r
10 X-Spam-Level: \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 QqRkZEc3Mwgp for <notmuch@notmuchmail.org>;\r
16         Sat,  7 Jan 2012 17:27:01 -0800 (PST)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id F24DA40A41E\r
20         for <notmuch@notmuchmail.org>; Sat,  7 Jan 2012 17:27:00 -0800 (PST)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id 8D41F2E50F03\r
23         for <notmuch@notmuchmail.org>; Sat,  7 Jan 2012 17:27:00 -0800 (PST)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-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 fire-doxen-submit (Postfix) with ESMTP id CFC632E50E05\r
28         for <notmuch@notmuchmail.org>; Sat,  7 Jan 2012 17:26:58 -0800 (PST)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 7B8C11118; Sat,  7 Jan 2012 17:26:58 -0800 (PST)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>\r
33 Subject: [PATCH 2/4] emacs: add option to notmuch-show-next-open-message to\r
34         pop out to parent buffer if at end\r
35 Date: Sat,  7 Jan 2012 17:26:53 -0800\r
36 Message-Id: <1325986015-22510-3-git-send-email-jrollins@finestructure.net>\r
37 X-Mailer: git-send-email 1.7.7.3\r
38 In-Reply-To: <1325986015-22510-2-git-send-email-jrollins@finestructure.net>\r
39 References: <1325975294-646-4-git-send-email-jrollins@finestructure.net>\r
40         <1325986015-22510-1-git-send-email-jrollins@finestructure.net>\r
41         <1325986015-22510-2-git-send-email-jrollins@finestructure.net>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Sun, 08 Jan 2012 01:27:01 -0000\r
55 \r
56 This will allow for keybindings that achieve a smoother message\r
57 processing flow by reducing the number of key presses needed for most\r
58 common operations.\r
59 ---\r
60  emacs/notmuch-show.el |   12 +++++++++---\r
61  1 files changed, 9 insertions(+), 3 deletions(-)\r
62 \r
63 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
64 index 8bb052e..e7bb958 100644\r
65 --- a/emacs/notmuch-show.el\r
66 +++ b/emacs/notmuch-show.el\r
67 @@ -1264,17 +1264,23 @@ any effects from previous calls to\r
68    (notmuch-show-mark-read)\r
69    (notmuch-show-message-adjust))\r
70  \r
71 -(defun notmuch-show-next-open-message ()\r
72 +(defun notmuch-show-next-open-message (&optional pop-at-end)\r
73    "Show the next message."\r
74    (interactive)\r
75 -  (let (r)\r
76 +  (let ((r)\r
77 +       (parent-buffer notmuch-show-parent-buffer))\r
78      (while (and (setq r (notmuch-show-goto-message-next))\r
79                 (not (notmuch-show-message-visible-p))))\r
80      (if r\r
81         (progn\r
82           (notmuch-show-mark-read)\r
83           (notmuch-show-message-adjust))\r
84 -      (goto-char (point-max)))))\r
85 +      (if (and parent-buffer pop-at-end)\r
86 +         (progn\r
87 +           (kill-this-buffer)\r
88 +           (switch-to-buffer parent-buffer)\r
89 +           (forward-line 1))\r
90 +       (goto-char (point-max))))))\r
91  \r
92  (defun notmuch-show-previous-open-message ()\r
93    "Show the previous message."\r
94 -- \r
95 1.7.7.3\r
96 \r