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

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

bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display


From: martin rudalics
Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display
Date: Mon, 3 Jul 2023 08:46:49 +0200

> Indeed, it's possible to add 'allow-no-window' in customization:
>
>    (setq display-buffer-alist
>          '(("\\*Async Shell Command\\*"
>             display-buffer-no-window
>             (allow-no-window . t))))
>    (setq async-shell-command-display-buffer nil)

But it's not recommended.  We say that

     It is assumed that when a caller of ‘display-buffer’ specifies a
     non-‘nil’ ‘allow-no-window’ entry, it is also able to handle a
     ‘nil’ return value.

and 'display-buffer-alist' is not in the domain of the caller.  We just
don't disallow it either so users are free to experiment with it (and
shoot themselves in the foot in the course of things).

> I think it's a plain bug that the first call of 'display-buffer'
> sets 'allow-no-window' to t, but the second call doesn't.
>
> These two 'display-buffer' calls were intended to do the same thing.
> Only the second call is delayed until input arrives.

Maybe the buffer display is intended to simply wake up the user.  I
would find it disruptive, though.

I'd suggest to fix it your way on master.  As for the release branch,
people can customize 'display-buffer-alist' the way you suggested above.
Eliza WDYT?

martin

reply via email to

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