GNU bug report logs - #18133
Suppressing asynchronous command output

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Mon, 28 Jul 2014 18:48:02 UTC

Severity: wishlist

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #56 received at 18133 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 18133 <at> debbugs.gnu.org
Subject: Re: bug#18133: Suppressing asynchronous command output
Date: Fri, 23 Dec 2016 21:07:37 +0000
[Message part 1 (text/plain, inline)]
On 23 December 2016 at 19:55, martin rudalics <rudalics <at> gmx.at> wrote:

> ​​
>
> Isn't this much more than changing the way ‘display-buffer’ behaves?
> IIUC, you want the buffer to pop up whenever some output arrives, the
> user should be allowed to delete the window, and when new output arrives
> the buffer should pop up again.  Correct?


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 there 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 buffer
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.

But I'm still confused by how you
> want to add something to ‘display-buffer-alist’ and at the same time to
> not change the behavior of ‘display-buffer’ ;-)

​
I suggested adding an option to display-buffer-alist's defcustom
specification, something like:

                :options (((regexp "\\*Async Shell Command\\*") (function
display-buffer-no-window)))

By default, this is not selected, so it does not change the default
behaviour.

I currently simply add an item to display-buffer-alist:

(add-to-list 'display-buffer-alist '("\\*Async Shell Command\\*"
                                     display-buffer-no-window))

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.