1 Return-Path: <tomi.ollila@iki.fi>
\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 9E294431FB6
\r
6 for <notmuch@notmuchmail.org>; Tue, 25 Dec 2012 13:06:01 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 TBWLWOXjbK53 for <notmuch@notmuchmail.org>;
\r
16 Tue, 25 Dec 2012 13:05:59 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 80CCE431FAE
\r
19 for <notmuch@notmuchmail.org>; Tue, 25 Dec 2012 13:05:59 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 00C981000F2;
\r
22 Tue, 25 Dec 2012 23:05:51 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] emacs: tweak error buffer handling
\r
26 In-Reply-To: <1356209345-11712-1-git-send-email-markwalters1009@gmail.com>
\r
27 References: <1356209345-11712-1-git-send-email-markwalters1009@gmail.com>
\r
28 User-Agent: Notmuch/0.14+216~gd58661f (http://notmuchmail.org) Emacs/24.2.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Tue, 25 Dec 2012 23:05:51 +0200
\r
34 Message-ID: <m2y5glvo40.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Tue, 25 Dec 2012 21:06:01 -0000
\r
51 On Sat, Dec 22 2012, Mark Walters <markwalters1009@gmail.com> wrote:
\r
53 > view-mode-enter changed between emacs 23 and emacs 24: the current
\r
54 > code makes the error buffer disappear in emacs 24 on quitting it (ie
\r
55 > pressing q) but this just kills the buffer without closing the split
\r
56 > window in emacs 23.
\r
58 > This patch makes the error buffer window disappear in emacs 23
\r
59 > too. Since the view-mode-enter function changed we have to test for
\r
60 > version and do the correct thing in each case.
\r
63 > This seems to work but I have only tested on 23.4 and 24.2
\r
65 I run emacs 23.1.1 to get the documentation of view-mode-enter
\r
66 there. So, this patch instructs to delete WINDOW when exiting
\r
69 Documentation of pop-to-buffer says:
\r
71 "Select buffer BUFFER-OR-NAME in some window, preferably a different one."
\r
73 What if pop-up-windows's value is nil -- the content of current window
\r
74 is replaced with this view stuff -- and when exiting view mode, the
\r
75 window will be deleted ? What happens with emacs 24 in this case ?
\r
85 > emacs/notmuch-lib.el | 8 +++++---
\r
86 > 1 files changed, 5 insertions(+), 3 deletions(-)
\r
88 > diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
\r
89 > index 77a591d..0407f8a 100644
\r
90 > --- a/emacs/notmuch-lib.el
\r
91 > +++ b/emacs/notmuch-lib.el
\r
92 > @@ -324,15 +324,17 @@ the user dismisses it."
\r
94 > (let ((buf (get-buffer-create "*Notmuch errors*")))
\r
95 > (with-current-buffer buf
\r
96 > - (view-mode-enter nil #'kill-buffer)
\r
97 > + (pop-to-buffer buf)
\r
98 > + (view-mode-enter (when (< emacs-major-version 24)
\r
99 > + (cons (selected-window) (cons nil t)))
\r
101 > (let ((inhibit-read-only t))
\r
102 > (goto-char (point-max))
\r
107 > - (insert "\n"))))
\r
108 > - (pop-to-buffer buf)))
\r
109 > + (insert "\n"))))))
\r
111 > (defun notmuch-check-async-exit-status (proc msg)
\r
112 > "If PROC exited abnormally, pop up an error buffer and signal an error.
\r
116 > _______________________________________________
\r
117 > notmuch mailing list
\r
118 > notmuch@notmuchmail.org
\r
119 > http://notmuchmail.org/mailman/listinfo/notmuch
\r