From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#18133: Suppressing asynchronous command output Date: Sat, 24 Dec 2016 11:11:37 +0000 Message-ID: References: <83zijp180n.fsf@gnu.org> <83eg100vy5.fsf@gnu.org> <585C132B.1030709@gmx.at> <585C347D.9050309@gmx.at> <585D740B.40303@gmx.at> <585D8120.1090300@gmx.at> <585E3CF2.4070800@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c062bd2f9e8f2054465903e X-Trace: blaine.gmane.org 1482577943 30606 195.159.176.226 (24 Dec 2016 11:12:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2016 11:12:23 +0000 (UTC) Cc: 18133@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 24 12:12:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKkFJ-0006et-Pa for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Dec 2016 12:12:14 +0100 Original-Received: from localhost ([::1]:43036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKkFO-0000hj-Ag for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Dec 2016 06:12:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKkFB-0000gK-Oq for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 06:12:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKkF8-0006JJ-Fr for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 06:12:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37866) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cKkF8-0006JF-Bs for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 06:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cKkF8-0007FR-6y for bug-gnu-emacs@gnu.org; Sat, 24 Dec 2016 06:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Dec 2016 11:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18133 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18133-submit@debbugs.gnu.org id=B18133.148257790627836 (code B ref 18133); Sat, 24 Dec 2016 11:12:02 +0000 Original-Received: (at 18133) by debbugs.gnu.org; 24 Dec 2016 11:11:46 +0000 Original-Received: from localhost ([127.0.0.1]:53265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKkEr-0007Eu-TH for submit@debbugs.gnu.org; Sat, 24 Dec 2016 06:11:46 -0500 Original-Received: from mail-qk0-f181.google.com ([209.85.220.181]:36661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cKkEp-0007Eh-ME for 18133@debbugs.gnu.org; Sat, 24 Dec 2016 06:11:44 -0500 Original-Received: by mail-qk0-f181.google.com with SMTP id n21so158872780qka.3 for <18133@debbugs.gnu.org>; Sat, 24 Dec 2016 03:11:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tKLb2nNSCcXYO142y0WSBAqHzPmXj1rHUDb1Vsavabc=; b=4s6X2g4+N7sGMe/izl0vZBfnuF36LYqzsOpYr0AlPjCen7O9KobKkD/J6CULwsDhj+ 7di0D9J7FjBFqpzjFpufFPrFA2o7Gebe1m1hL9dsPQFERrBEqrIJz5X6rVGPeXhngKVG xKvHEOam9P8ETcDFYMqBRTrgJmlOfqtorbYIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tKLb2nNSCcXYO142y0WSBAqHzPmXj1rHUDb1Vsavabc=; b=udc/KjG4Lv3EeOx1jkregc37a17CSqEOt0Us737RPEfgGhoVTie4SBjtY+BPYsBNQp h4I3xFiOQPK0VV8MORTyHb3MAQ8ps5fP1qaxPWMXe2pdCVQ/d9LSikQWQorEDEYXw3bA IqlkkC15Vuv/8rlEEDmaZLIsekZjtCW9aTL8BzlRbTkeO7moYVf4B45wzPV1W1xZ6ZYJ ViK3G97DCYT/mubCRBKZINOPrmHFi0U+lWCFDb691v+HXh5m8je+EcHIYJWagu2m7D4u TchV9eQTrjKbXjAKXCd/jf+6ktpD5RlVF7ygPOBYhgBptd0uMyHQwOhSLVUyY5bde1tJ /Tlw== X-Gm-Message-State: AIkVDXIXFXL1NVzoibJ8QvOcoadAtgfKrAKNFQ1GuPBno0yyNRqRYSO2KTMMcz5YdVIKcmwd4mGSn0aQ1tQkjHkZ X-Received: by 10.55.165.141 with SMTP id o135mr18823539qke.119.1482577898219; Sat, 24 Dec 2016 03:11:38 -0800 (PST) Original-Received: by 10.140.88.51 with HTTP; Sat, 24 Dec 2016 03:11:37 -0800 (PST) In-Reply-To: <585E3CF2.4070800@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127386 Archived-At: --94eb2c062bd2f9e8f2054465903e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 24 December 2016 at 09:16, martin rudalics wrote: > > Here is the implementation I currently use (from Juri Linkov, message #= 8, > > second block of code): > > > > (advice-add 'comint-output-filter :after > > "Stop Async Shell Command output from appearing until ther= e > is > > output." > > (lambda (process string) > > (when (and (string-match-p "\\*Async Shell Command\\*" > > (buffer-name (process-buffer > > process)))) > > (display-buffer (process-buffer process))))) > > > > I think this does what you say: whenever some output arrives, the buffe= r > > pops up. It does not involve changing the behaviour of display-buffer. > > > > All my patch does is move the advice into a function suitable for > > comint-output-filter-functions. > > To turn this into a minor mode I would do two things: > =E2=80=8BPlease, start from the patch I provided, and read the discussion i= n previous messages; otherwise, you're partly rehashing old conversations. In any case, adding a minor mode might be tidier than adding suggestions to display-buffer-alist, but it's worse in terms of adding complexity to Emacs. It's not worth it. In my view, what I suggested is simply the correct behaviour, and should be the default. In Eli's view, we should not change the default unless it proves popular. I am therefore seeking a way to make it easier to customize than at present (as you can see, at present it requires 10 lines of code, which is 10 times too much). =E2=80=8BAny suggestions?=E2=80=8B Eli? If you now try to customize =E2=80=98display-buffer-alist=E2=80=99, you'll = be told that > this option has been "CHANGED outside Customize". You can avoid that by > doing > > (customize-save-variable > 'display-buffer-alist > (add-to-list > 'display-buffer-alist '("\\*Async Shell Command\\*" > display-buffer-no-window))) > > instead. > =E2=80=8BThanks, I've made that change to my configuration. --=20 http://rrt.sc3d.org --94eb2c062bd2f9e8f2054465903e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On = 24 December 2016 at 09:16, martin rudalics <rudalics@gmx.at> w= rote:
> Her= e is the implementation I currently use (from Juri Linkov, message #8,
> second block of code):
>
> (advice-add 'comint-output-filter :after
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Stop Async Shell= Command output from appearing until there is
> output."
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (process strin= g)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (and (str= ing-match-p "\\*Async Shell Command\\*"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(buffer-name (process-buffer
> process))))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (display= -buffer (process-buffer process)))))
>
> I think this does what you say: whenever some output arrives, the buff= er
> pops up. It does not involve changing the behaviour of display-buffer.=
>
> All my patch does is move the advice into a function suitable for
> comint-output-filter-functions.

To turn this into a minor mode I would do two things:
=
=E2= =80=8BPlease, start from the patch I provided, and read the discussion in p= revious messages; otherwise, you're partly rehashing old conversations.=

In any case, adding a minor mode might be tidier than adding sugge= stions to display-buffer-alist, but it's worse in terms of adding compl= exity to Emacs. It's not worth it.
In my view, what I suggested is simply= the correct behaviour, and should be the default.

In Eli's view, we shou= ld not change the default unless it proves popular.

I am therefore seeking a = way to make it easier to customize than at present (as you can see, at pres= ent it requires 10 lines of code, which is 10 times too much).

=E2=80=8BAny s= uggestions?=E2=80=8B Eli?

If you now try to customize =E2=80=98display-buf= fer-alist=E2=80=99, you'll be told that
this option has been "C= HANGED outside Customize".=C2=A0 You can avoid that by
doing
(customize-save-variable
=C2=A0'display-buffer-alist
=C2=A0(add-to-list
=C2=A0 'display-buffer-alist '(&q= uot;\\*Async Shell Command\\*"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 display-buff= er-no-window)))

instead.
=E2=80=8BThanks, I've made that ch= ange to my configuration.

--
http://rrt.sc3d.org
--94eb2c062bd2f9e8f2054465903e--