[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-ch
From: |
Eli Zaretskii |
Subject: |
bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice |
Date: |
Thu, 16 Feb 2023 22:17:18 +0200 |
> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: 61553@debbugs.gnu.org
> Date: Thu, 16 Feb 2023 19:36:36 +0100
>
> On Thu, 16 Feb 2023 at 19:59, Eli Zaretskii wrote:
>
> >> (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?
I don't think the function itself can make that decision. Only the
caller knows what's right for the context.
> The purpose of long-form is to protect the user from doing something
> dangerous by accidentally pressing a key.
That's only one possible cause of using the long form. There could be
others.
> 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.
I disagree that rmc.el should make that decision. It isn't its call
(pun intended).