From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: dbus.el and use-dialog-box Date: Thu, 14 Jul 2016 14:30:13 +0200 Message-ID: <87eg6wv1uy.fsf@gmx.de> References: <87y456ish7.fsf@fx.delysid.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468502474 18514 80.91.229.3 (14 Jul 2016 13:21:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jul 2016 13:21:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mario Lang Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 14 15:21:06 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNgZe-0001H0-9Q for ged-emacs-devel@m.gmane.org; Thu, 14 Jul 2016 15:21:06 +0200 Original-Received: from localhost ([::1]:53755 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNgZd-0004jV-Eu for ged-emacs-devel@m.gmane.org; Thu, 14 Jul 2016 09:21:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNfmX-0001uj-K1 for emacs-devel@gnu.org; Thu, 14 Jul 2016 08:30:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNfmT-0002ts-BC for emacs-devel@gnu.org; Thu, 14 Jul 2016 08:30:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:56065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNfmT-0002th-0n for emacs-devel@gnu.org; Thu, 14 Jul 2016 08:30:17 -0400 Original-Received: from detlef.gmx.de ([87.146.45.70]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0M9bYB-1bWmrp3lIl-00CxEg; Thu, 14 Jul 2016 14:30:15 +0200 In-Reply-To: <87y456ish7.fsf@fx.delysid.org> (Mario Lang's message of "Tue, 12 Jul 2016 21:09:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:wPz3Ox0qHLbzKp7nYqx9HVItGv/tWmJHW0ZAxhTHbVRVQXHy+DU rWyvYMYxxwS/ZiNrh91jnKw9iTHiptwOauNckJLcf7JxBCM7apkyvmHtmKbZjQh3Tl3PFxi jnABOC1gzHF675pq+mihM49y39jHJVFqx0aAmpaLCKPVRIehbWVLQmQ2WNcrMFhv/a7QGvj O/ZgcE2LpbZbpsBXaRUsA== X-UI-Out-Filterresults: notjunk:1;V01:K0:IulAxTwQJYM=:3PTDILR5Jd52uVEv8b9FnB Cj9L8TLFWOj/vPK9EqpU5EQBc2yQ9Lb6KiV+DOu0JOGOreM5gxFG5Odp8MDEao1l8426MntKa wzIJv+ml3cIQadKdoZj8vsq2LMFJj3knacW6oLSxTpFKp7zgnY7HQodY78rFJGasRn9biTvZn BMk4v05Wp7EH8fjryhoIBgjCaX0/GDdvyMLf3avEY6DUsbKfZmh9zL9WY8JNbS06/OIW2PGMr mMZuR9P35p5nxvEFMWvvWlUDsXWgQILbreIsAT/j4XgTH00Fpj0df7B2P8KRXcIfQoWDJVS1p Ve20Npturgm4szd7Vrehh/ixaITmoApDM+g9CaxF04TBisuxsWEsvWQ0qanWu3Es4ooEgMBYl Qx18p7FV4rLq07EY358fW8mksjmFeEkVLVCmHd1ZPSaysaEtsdZ8lbxPIsuj77K3xFDLMyxlG YMM9JNI5tLOnLzy8lhwRce4qukpqTLQYd0UGFjSRHHVY+468Z++dN4mbsBQSmkI1OPSl+q5GM D9z9Ja41Ow6FSDUmUlfgm1zaEpn2qyWjpEUFpp7QAQ2VWwxkVN8gWy0trs27/RkwZCIJ4GX5L 9fTn8HBD9hOmksupGAvvQs/wxMNuVsSA7E33QTi5M4yTyzk7NjswJpfus8SI1Ijyb0n1dCydw Sg4aeX0BNLLYbmMr7dl3P2yoPqmpqZbnm/GjQkJ+DWbuuLVRxWC4QFGODYtShBUh8zt/MKDHp xgXkHkMDGcxx8sPGJgsRjsNxKBTSeYDtQz1Jy1cc7pc2j/3xQpVlyMqi1yGpe0EOihVmtW7I X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:205673 Archived-At: Mario Lang 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.