From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Date: Thu, 16 Feb 2023 19:36:36 +0100 Message-ID: <875yc1foej.fsf@gmail.com> References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25141"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61553@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 16 19:37:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSj86-0006RL-Sa for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Feb 2023 19:37:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSj7v-00011q-SK; Thu, 16 Feb 2023 13:37:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSj7u-0000w1-T5 for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 13:37:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSj7u-0004qS-K9 for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 13:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSj7u-0003bb-Ad for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 13:37:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Feb 2023 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61553 X-GNU-PR-Package: emacs Original-Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.167657260613835 (code B ref 61553); Thu, 16 Feb 2023 18:37:02 +0000 Original-Received: (at 61553) by debbugs.gnu.org; 16 Feb 2023 18:36:46 +0000 Original-Received: from localhost ([127.0.0.1]:37662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSj7e-0003b5-07 for submit@debbugs.gnu.org; Thu, 16 Feb 2023 13:36:46 -0500 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]:42857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSj7c-0003at-Hd for 61553@debbugs.gnu.org; Thu, 16 Feb 2023 13:36:45 -0500 Original-Received: by mail-ed1-f42.google.com with SMTP id a10so6305287edu.9 for <61553@debbugs.gnu.org>; Thu, 16 Feb 2023 10:36:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=0NnULCQdhHCPWHcUIaOw9X7fE3t6UBwJjNKHYcC0GmY=; b=HMs5GbarunDzGIP8bPqV7vPisIEVUGS27qUmeAalZqEQPHqzUpPahuh9OsXKnH52wC tAzsizduNNdIBerJrerSZTANYhNd2+5P7OHd3sO5V/mz4lbnMSCEt5ZPzfmNXAJXyLu2 m3/wy1MSlq4uhl+gsTnC1z0D3trMnRn8fpp4svCYf4690BHEPvP5aj7AKd3C2X9/hJu2 rrwq+bYEmIaJrPiUIU4zJm0g2OsRbOA1ZRmnR/Fxuw38ov+Vs0v3FRlW48ITd7zdzjH7 gKgsG7ll9h//N2CySUcoY2xkQyDWa1c8v6ixlYkyzKI7xiu4mTWRXU7JnduhuMkROg/H cVbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0NnULCQdhHCPWHcUIaOw9X7fE3t6UBwJjNKHYcC0GmY=; b=VKv1pJfNAopntHdQmriedce1DabmECIaKeVVtq37BeQz7t4sm/tlssPeMTIQEqMgdH LJhWs+Bn6dfZDkCvEYUjN3RrI+UKE7RkRmV+s1EPca3Wv67tRhwOMZH6/DTu1k3bm0Eu Qhuh6mMdqNybME6FL4AQ8B3/g8Eln2e+5VTYG2Tc9Vd/ljJaAUSZd2PjI8ShR38w5beo jnIbhGjjbv84zC4uxsxzsHvvNDlvKjbnIrti66JefotRmwibqPIXO/hDRoEkoAqMMM8D P3yg+58z4lqlnfrbYsUBkPsFd+BIgy54bY3zObl3kkuKELbG3oFcmQ/mJgbpMreZ9DHM O1vg== X-Gm-Message-State: AO0yUKWiLxeem+wdZWwkNS1tWIxxDNmebtzEoWZQlFi7vv0D/DHK4RbL LEQi+L80G5KIPwY05m8mwuUnxIrsz4c= X-Google-Smtp-Source: AK7set9/rbRgX82VNeOv0GItIvYx+xbx0v0BPbduh7PDS6zFPjC5020+8RihZWL+EMN3VVcoHq2piA== X-Received: by 2002:aa7:c1d8:0:b0:4ac:be42:5c66 with SMTP id d24-20020aa7c1d8000000b004acbe425c66mr6875426edp.11.1676572598168; Thu, 16 Feb 2023 10:36:38 -0800 (PST) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::6fd0]) by smtp.gmail.com with ESMTPSA id o3-20020a509b03000000b004acbf1d8412sm1261528edi.1.2023.02.16.10.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 10:36:37 -0800 (PST) In-Reply-To: <83edqp330z.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Feb 2023 19:59:08 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255832 Archived-At: On Thu, 16 Feb 2023 at 19:59, Eli Zaretskii wrote: >> From: Augusto Stoffel >> 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.