bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18133: Suppressing asynchronous command output


From: Reuben Thomas
Subject: bug#18133: Suppressing asynchronous command output
Date: Sat, 24 Dec 2016 11:11:37 +0000

On 24 December 2016 at 09:16, martin rudalics <rudalics@gmx.at> 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 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.

To turn this into a minor mode I would do two things:

​Please, start from the patch I provided, and read the discussion in 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).

​Any suggestions?​ Eli?

If you now try to customize ‘display-buffer-alist’, 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.

​Thanks, I've made that change to my configuration.

--

reply via email to

[Prev in Thread] Current Thread [Next in Thread]