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