From: Austin Clements Date: Thu, 12 Sep 2013 14:53:26 +0000 (+2000) Subject: Re: [PATCH] emacs: show: stop stderr appearing in buffer X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6af12872bca8112a4fcb831ebd9edb2576663a70;p=notmuch-archives.git Re: [PATCH] emacs: show: stop stderr appearing in buffer --- diff --git a/81/ec3c52b0e5c4ff8d96ac3d4f9385ca3fd86cc6 b/81/ec3c52b0e5c4ff8d96ac3d4f9385ca3fd86cc6 new file mode 100644 index 000000000..a46f75b9f --- /dev/null +++ b/81/ec3c52b0e5c4ff8d96ac3d4f9385ca3fd86cc6 @@ -0,0 +1,142 @@ +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 1368F431FAF + for ; Thu, 12 Sep 2013 07:53:43 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 161IcCx4ucWD for ; + Thu, 12 Sep 2013 07:53:35 -0700 (PDT) +Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu + [18.7.68.35]) + by olra.theworths.org (Postfix) with ESMTP id EF113431FAE + for ; Thu, 12 Sep 2013 07:53:34 -0700 (PDT) +X-AuditID: 12074423-b7f168e00000095a-a4-5231d56d49ba +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP + id EF.3F.02394.D65D1325; Thu, 12 Sep 2013 10:53:33 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r8CErVCQ015916; + Thu, 12 Sep 2013 10:53:32 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r8CErSig012589 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Thu, 12 Sep 2013 10:53:30 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1VK8Gt-0004GM-ND; Thu, 12 Sep 2013 10:53:27 -0400 +Date: Thu, 12 Sep 2013 10:53:26 -0400 +From: Austin Clements +To: Mark Walters +Subject: Re: [PATCH] emacs: show: stop stderr appearing in buffer +Message-ID: <20130912145326.GK1426@mit.edu> +References: <1378502198-7980-1-git-send-email-markwalters1009@gmail.com> + <87r4cwojds.fsf@zancas.localnet> <87ppsepeo9.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87ppsepeo9.fsf@qmul.ac.uk> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IRYrdT1829ahhkcHaftMWN1m5Gi9VzeSyu + 35zJ7MDssXPWXXaPZ6tuMXtsOfSeOYA5issmJTUnsyy1SN8ugStj3voV7AWrRSu27DrH3MB4 + W6CLkZNDQsBEYmnbC2YIW0ziwr31bF2MXBxCAvsYJdb8PcMC4WxklFhxeQaUc5pJYtGqTawQ + zhJGibO3DjOC9LMIqEocP/4ObBabgIbEtv3LweIiAjoStw8tYAexmQXsJI587wKLCws4SrTc + XMIKYvMKaEs0TFgPNbSTUeJc7w42iISgxMmZT1ggmrUkbvx7ydTFyAFkS0ss/8cBEuYE2rX/ + 2VUmEFtUQEViysltbBMYhWYh6Z6FpHsWQvcCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFumZ6 + uZkleqkppZsYwcHuoryD8c9BpUOMAhyMSjy8M64YBgmxJpYVV+YeYpTkYFIS5dUCCfEl5adU + ZiQWZ8QXleakFh9ilOBgVhLh3XQeKMebklhZlVqUD5OS5mBREudd76QfJCSQnliSmp2aWpBa + BJOV4eBQkuAtAxkqWJSanlqRlplTgpBm4uAEGc4DNHwuSA1vcUFibnFmOkT+FKOilDjvRpCE + AEgiozQPrheWjF4xigO9Isy7HqSKB5jI4LpfAQ1mAhr83VcfZHBJIkJKqoExRrXf+nmk/IqX + 8jWx6QU2h66kO1rnns9nWrrz5a/8CdW7q9au3KP8IMjimNyDivar84LkOHwEjizZyx9hz3At + smmOxEHv46GqrcuEbh9Jv2cZ8PnZtTvircE3T1gvXuTkl3ZM6sfhCrliax1loyl3XpzyESiT + /pPUs3ZG+xner9O/791mkLJGiaU4I9FQi7moOBEACK5P5yEDAAA= +Cc: 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: Thu, 12 Sep 2013 14:53:43 -0000 + +Quoth Mark Walters on Sep 12 at 10:33 am: +> +> Hi +> +> On Tue, 10 Sep 2013, David Bremner wrote: +> >> Ideally, we would put this output in the notmuch errors buffer but the +> >> handler is called asynchronously so we don't know when the output will +> >> appear. Thus if we put it straight into the errors buffer it could get +> >> interleaved with other errors, otoh we can't easily tell when we +> >> have got all the error output so can't wait until the process is complete. +> > +> > Hi Mark; +> > +> > I think your patch is OK, but would it be much harder to created a named +> > buffer like *notmuch-view-$message-d* ? (using e.g. the code from +> > notmuch-show). I might make debugging easier. +> +> Yes this is easy. There are several possibilities and I am not sure +> which is best (some are clearly bad but are worth mentioning anyway). +> +> 1) have a single buffer for part errors; this would accumulate stuff and +> output seems to get interleaved so this is probably useless. +> +> 2) have a buffer for each part viewer as you describe. +> +> 3) have a buffer for each part viewer but start its name with a space so +> it doesn't show up in buffer lists but is findable (maybe) + +3.5) Say something in the echo area when a viewer terminates with +output, so it doesn't interrupt the user if they're doing something, +but the output buffer is still discoverable. Maybe bind C-c ` to show +the most recently reported output buffer, like what (la)tex-mode and +others do, and mention this binding in the echo area message. + +> 4) stick with just the temp buffer approach +> +> Also, we could have it togglable with some sort of debug flag. In some +> senses 3 is nice but you would probably end up with 10's or even +> hundreds of hidden buffers which seems bad. In 2 you see them so you +> probably kill them as you go but I think they would be pretty +> annoying. A key difference from the accumulated show/search/pick buffers +> is that, at some point, you did want to see those buffers. + +3.5.1) Don't create a buffer until the command has output (or, easier +to implement: create the buffer, but kill it on exit if there was no +output). When starting a new command, kill output buffers from +no-longer-running viewers that have never been visited (using +buffer-display-count or buffer-display-time). + +> Since all these approaches are easy to implement it is really up to us +> which we want. +> +> Any thoughts? +> +> Mark +> +> +> > +> > Of course those buffers would accumulate, along with show, search and +> > pick buffers... +> > +> > Or we could push this as is, and add some debugging facility later like +> > a variable notmuch-view-errors-buffer. +> > +> > d