unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 61553@debbugs.gnu.org
Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice
Date: Thu, 16 Feb 2023 19:36:36 +0100	[thread overview]
Message-ID: <875yc1foej.fsf@gmail.com> (raw)
In-Reply-To: <83edqp330z.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Feb 2023 19:59:08 +0200")

On Thu, 16 Feb 2023 at 19:59, Eli Zaretskii wrote:

>> From: Augusto Stoffel <arstoffel@gmail.com>
>> Date: Thu, 16 Feb 2023 17:19:30 +0100
>> 
>> 
>> In the scratch buffer of emacs -Q, type
>> 
>>     (read-multiple-choice "Question" '((?y "yes") (?n "no")))
>> 
>> then click, on the menu bar, "Lisp-Interaction -> Evaluate and Print".
>> As expected, I see a dialog box.
>> 
>> Now repeat the same using the long-form style:
>> 
>>     (read-multiple-choice "Question" '((?y "yes") (?n "no")) nil nil t)
>> 
>> Then I get a minibuffer query, but I would expect a dialog box in the
>> case as well.
>
> The long-form call does a completing-read, and we don't support that
> via GUI dialogs (how could we?).

Of course.  The point is what takes precedence: the decision to prefer a
dialog over keyboard input, or the decision to do a completing-read
instead of reading a single char?

The purpose of long-form is to protect the user from doing something
dangerous by accidentally pressing a key.  I don't think a mouse
equivalent for that exists or is needed.

So instead of adding a special case for kill-buffer, I would rather
modify the behavior of RMC to just ignore the long-form argument if
(use-dialog-box-p) returns t.  Apart from that, your patch seems fine.





  reply	other threads:[~2023-02-16 18:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 16:19 bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Augusto Stoffel
2023-02-16 17:59 ` Eli Zaretskii
2023-02-16 18:36   ` Augusto Stoffel [this message]
2023-02-16 20:17     ` Eli Zaretskii
2023-02-17 10:24       ` Robert Pluim
2023-02-17 12:31         ` Eli Zaretskii
2023-02-17 12:42           ` Robert Pluim
2023-02-19  9:32       ` Eli Zaretskii

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=875yc1foej.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=61553@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).