From: Michael Albinus <michael.albinus@gmx.de>
To: Mario Lang <mlang@delysid.org>
Cc: emacs-devel@gnu.org
Subject: Re: dbus.el and use-dialog-box
Date: Thu, 14 Jul 2016 14:30:13 +0200 [thread overview]
Message-ID: <87eg6wv1uy.fsf@gmx.de> (raw)
In-Reply-To: <87y456ish7.fsf@fx.delysid.org> (Mario Lang's message of "Tue, 12 Jul 2016 21:09:08 +0200")
Mario Lang <mlang@delysid.org> writes:
> Hi.
Hi Mario,
> It appears that `yes-or-no-p' when called from a D-Bus
> method handler honors `use-dialog-box'. In other words, when
> `use-dialog-box' is non-nil, `yes-or-no-p' uses a dialog to ask the
> question.
Yes. I suspect this would also be the case for file notification events
(not tested) and other special events.
> The docstring of `use-dialog-box' only refers to mouse events:
>
> "Non-nil means mouse commands use dialog boxes to ask questions.
> This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands
> invoked by mouse clicks and mouse menu items."
>
> Is this expected behaviour, or should D-Bus events be excluded
> (from the check in Fyes_or_no_p?)
If you have a look on Fyes_or_no_p, there is no dedicated check for
mouse events. The check reads
if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
&& use_dialog_box && ! NILP (last_input_event))
A similar check, using last_nonmenu_event and use_dialog_box, is applied
also in other functions, like Fmessage_or_box and
Fnext_read_file_uses_dialog_p. A cons cell in last_nonmenu_event is
regarded as mouse event, but this isn't true any longer for years. Any
special event represented as cons cell will match.
It might not be the designed behaviour, but I find it natural. Everybody
who dislikes this could configure use-dialog-box So I propose to
document this behaviour in the said three functions as well as in
use_dialog_box, replacing "mouse events" by "special events".
Best regards, Michael.
next prev parent reply other threads:[~2016-07-14 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 19:09 dbus.el and use-dialog-box Mario Lang
2016-07-14 12:30 ` Michael Albinus [this message]
2016-07-14 13:32 ` Stefan Monnier
2016-07-14 18:18 ` Michael Albinus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eg6wv1uy.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=mlang@delysid.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.