GNU bug report logs - #64394
[PATCH] Fix `async-shell-command-display-buffer' display

Previous Next

Package: emacs;

Reported by: Eliza Velasquez <eliza <at> eliza.sh>

Date: Sat, 1 Jul 2023 01:01:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eliza Velasquez <eliza <at> eliza.sh>, Eli Zaretskii <eliz <at> gnu.org>,
 64394 <at> debbugs.gnu.org
Subject: Re: 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

This bug report was last modified 2 years and 18 days ago.

Previous Next


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