Subject: bug#18133: Suppressing asynchronous command output

From: Eli Zaretskii <[email-masked]>
Date: Sat, 24 Dec 2016 18:03:06 +0200

> Date: Sat, 24 Dec 2016 14:54:00 +0100
> From: martin rudalics <[email-masked]>
> CC: [email-masked]
> 
>  > display-buffer-alist is a defcustom.  The issue at hand is to offer
>  > users a way of customizing display-buffer-alist such that buffers
>  > whose names match "*Async Shell Command*" will not be displayed unless
>  > they have something to show the user.
>  >
>  > Martin, what can we add to the display-buffer-alist's defcustom to
>  > allow users easy customization to that effect?
> 
> Let me try to explain this once more: The idea of ‘display-buffer-alist’
> was to provide an option with a default value of nil.  An option
> entirely in the hands of the user, which means that no code is allowed
> to change its value.  In the five years since its introduction, new
> Emacs code has followed this convention.

I'm not talking about any code that would change the default value.
I'm talking about showing the users a non-default value, for them to
select if they want to, that would produce the effect desired here.

IOW, when the user clicks "Value menu", I would like them to see a
value which makes async shell buffers behave like Reuben wants.
That's all.

If you are saying that we must not show any value but nil in the value
menu, then my next question will be why is this variable a defcustom,
if users are not allowed to select non-default values for it.

> Applications have three ways to affect what ‘display-buffer’ does:

We are not talking about any applications, at least I wasn't.  I was
talking about providing another possible value, that'd be easy to
select without writing any Lisp, and which, when selected, will cause
the async shell output buffer be displayed only when there's some
material in it.

> Is it really so difficult to provide an extra option which allows to
> have either of these trigger the wanted behavior?  Also taking into
> account that the lazy pop-up behavior Reuben aims at cannot be obtained
> by customizing an existing option anyway?

AFAIU, customizing display-buffer-alist, an existing option, does in
fact produce the desired effect.