Re: [PATCH] emacs: tweak error buffer handling
authorMark Walters <markwalters1009@gmail.com>
Fri, 28 Dec 2012 09:03:08 +0000 (09:03 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:52:51 +0000 (09:52 -0800)
25/28d7ae7d3df33f8007c3823fa2e73a05a4dd52 [new file with mode: 0644]

diff --git a/25/28d7ae7d3df33f8007c3823fa2e73a05a4dd52 b/25/28d7ae7d3df33f8007c3823fa2e73a05a4dd52
new file mode 100644 (file)
index 0000000..354958d
--- /dev/null
@@ -0,0 +1,149 @@
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CD121431FB6\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Dec 2012 01:03:23 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+       tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+       NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id qS5yJYryADAc for <notmuch@notmuchmail.org>;\r
+       Fri, 28 Dec 2012 01:03:20 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id C34B3431FAF\r
+       for <notmuch@notmuchmail.org>; Fri, 28 Dec 2012 01:03:19 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+       by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1ToVqP-0006xO-Vt; Fri, 28 Dec 2012 09:03:10 +0000\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
+       by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
+       (envelope-from <m.walters@qmul.ac.uk>)\r
+       id 1ToVqP-0001Zr-Kh; Fri, 28 Dec 2012 09:03:09 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [PATCH] emacs: tweak error buffer handling\r
+In-Reply-To: <20121227230402.GY6187@mit.edu>\r
+References: <1356209345-11712-1-git-send-email-markwalters1009@gmail.com>\r
+       <m2y5glvo40.fsf@guru.guru-group.fi> <87k3s4fnz8.fsf@qmul.ac.uk>\r
+       <20121227230402.GY6187@mit.edu>\r
+User-Agent: Notmuch/0.14+236~g1d0044f (http://notmuchmail.org) Emacs/23.4.1\r
+       (i486-pc-linux-gnu)\r
+Date: Fri, 28 Dec 2012 09:03:08 +0000\r
+Message-ID: <87ip7my2er.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-SPAM-Info: Sender has good ham record.  :)\r
+X-QM-Body-MD5: 6f2abbe81e6558d471008d586310a8dc (of first 20000 bytes)\r
+X-SpamAssassin-Score: -1.8\r
+X-SpamAssassin-SpamBar: -\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+       determine if it is\r
+       spam. We require at least 5.0 points to mark a message as spam.\r
+       This message scored -1.8 points.\r
+       Summary of the scoring: \r
+       * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
+       *      medium trust\r
+       *      [138.37.6.40 listed in list.dnswl.org]\r
+       * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+       provider *      (markwalters1009[at]gmail.com)\r
+       * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+       *      domain\r
+       *  0.5 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 28 Dec 2012 09:03:23 -0000\r
+\r
+\r
+Austin Clements <amdragon@MIT.EDU> writes:\r
+\r
+> Quoth Mark Walters on Dec 26 at 10:27 pm:\r
+>> \r
+>> On Tue, 25 Dec 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+>> > On Sat, Dec 22 2012, Mark Walters <markwalters1009@gmail.com> wrote:\r
+>> >\r
+>> >> view-mode-enter changed between emacs 23 and emacs 24: the current\r
+>> >> code makes the error buffer disappear in emacs 24 on quitting it (ie\r
+>> >> pressing q) but this just kills the buffer without closing the split\r
+>> >> window in emacs 23.\r
+>> >>\r
+>> >> This patch makes the error buffer window disappear in emacs 23\r
+>> >> too. Since the view-mode-enter function changed we have to test for\r
+>> >> version and do the correct thing in each case.\r
+>> >> ---\r
+>> >>\r
+>> >> This seems to work but I have only tested on 23.4 and 24.2\r
+>> >\r
+>> > I run emacs 23.1.1 to get the documentation of view-mode-enter\r
+>> > there. So, this patch instructs to delete WINDOW when exiting\r
+>> > view mode...\r
+>> >\r
+>> > Documentation of pop-to-buffer says:\r
+>> >\r
+>> > "Select buffer BUFFER-OR-NAME in some window, preferably a different one."\r
+>> >\r
+>> > What if pop-up-windows's value is nil -- the content of current window\r
+>> > is replaced with this view stuff -- and when exiting view mode, the\r
+>> > window will be deleted ? What happens with emacs 24 in this case ?\r
+>> \r
+>> Hi \r
+>> \r
+>> You are quite right there are problems here under emacs 23: if you\r
+>> already have a split window when the error occurs in one part the error\r
+>> is displayed in the other window and then on exit that (previously\r
+>> existing) window is closed.\r
+>> \r
+>> What do people think should happen on an error? I, personally, don't\r
+>> like taking over an existing window, and Jamie liked some of the errors\r
+>> (eg non-fatal `locked database' tagging errors) to be shown in the\r
+>> mini-buffer.\r
+>> \r
+>> I also think it is going to be difficult to get this right: emacs 23 and\r
+>> 24 are different and there are also some user configuration variable\r
+>> that affect what happens.\r
+>\r
+> How about showing all errors in the minibuffer (which could simply\r
+> mean calling (error ...) and letting the Emacs top-level show it in\r
+> the mini-buffer)?  We could log the verbose error details (like\r
+> stdout) to some other buffer that we don't automatically show, but\r
+> instead simply reference from the minibuffer message.  This would be\r
+> more in line with how Emacs typically handles errors, and would make\r
+> the details available to the user without flooding them with the\r
+> details.\r
+\r
+Hi \r
+\r
+That sounds great. In an ideal world we could behave slightly\r
+differently for fatal errors but the common errors are likely to be\r
+transient (locked database errors) so getting these right (which this\r
+would do) seems the important step.\r
+\r
+My view is that we should push a fix like the above for 0.15. What do\r
+other people think?\r
+\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r