unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Juri Linkov <juri@linkov.net>
Cc: Eliza Velasquez <eliza@eliza.sh>, Eli Zaretskii <eliz@gnu.org>,
	64394@debbugs.gnu.org
Subject: bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display
Date: Mon, 3 Jul 2023 08:46:49 +0200	[thread overview]
Message-ID: <e389955b-9750-a5ae-dbd3-4b3bb10fa02a@gmx.at> (raw)
In-Reply-To: <86cz1axjtl.fsf@mail.linkov.net>

 > 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	other threads:[~2023-07-03  6:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-01  1:00 bug#64394: [PATCH] Fix `async-shell-command-display-buffer' display Eliza Velasquez
2023-07-01  7:24 ` Eli Zaretskii
2023-07-01  7:52   ` Eliza Velasquez
2023-07-01  8:12     ` Eli Zaretskii
2023-07-01  8:42       ` Eliza Velasquez
2023-07-02  7:09     ` martin rudalics
2023-07-02 18:03       ` Juri Linkov
2023-07-03  6:46         ` martin rudalics [this message]
2023-07-04  1:18           ` Eliza Velasquez
2023-07-04 17:54             ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e389955b-9750-a5ae-dbd3-4b3bb10fa02a@gmx.at \
    --to=rudalics@gmx.at \
    --cc=64394@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=eliza@eliza.sh \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).