From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Feb 2023 16:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 61553@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167656439332477 (code B ref -1); Thu, 16 Feb 2023 16:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Feb 2023 16:19:53 +0000 Received: from localhost ([127.0.0.1]:37468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgzB-0008Rl-Gf for submit@debbugs.gnu.org; Thu, 16 Feb 2023 11:19:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:55718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgzA-0008Rd-12 for submit@debbugs.gnu.org; Thu, 16 Feb 2023 11:19:52 -0500 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 1pSgz9-0000wo-KO for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 11:19:51 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSgz6-00057B-Ik for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 11:19:51 -0500 Received: by mail-ed1-x52b.google.com with SMTP id d40so4815879eda.8 for ; Thu, 16 Feb 2023 08:19:34 -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:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=2hPZxxKwpgwooSoGPQvvI5Zt2Fn9QPydPHdgUGd1H6Q=; b=ivprPw1S75XeDV2V/kcWsQzcRGL3aUFlLStciQk7Dk5H8WnNeA8GyPiBQbzd7x9cTD oKlkE8mHfKE8AqYMFg3z9IW5NMpkY6U4dLq1t/bkR48syQOJAPjWe6uYz2kJORNli8Fs PJHW0Ja87puPQGnnmcgkW5W+svIOi+wRNw5dyzXJqxYiPfFpypawzBKNrXgwOoNrNFm1 Cgb5rxbxLRjAhLIp/7nKbAPqEvyFB8lndS66gKdLI2FzRr7Bj1EAbBt8XEhiMVfd69vb GJh6wJEjRBsEoR4O4K8OaXSYVMFi3ApfJuX0EJsTV8Xv6szoGTRhw2WpSCiu9fp/DmrP 8HQA== 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:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2hPZxxKwpgwooSoGPQvvI5Zt2Fn9QPydPHdgUGd1H6Q=; b=2kpQ0AShGLMeAXfCTHO2jbZ7uYZwzDJNH8OyYLse/Uf9RAT2ZE4ocoeIhbR/o/3B7v JbHRQBKD9yx/5/EZldCqvaPNAYK5HgzjSmUGlZqOKRKKwqdaXFt9kNE+KaJWVFXutoy5 Dh+Idp5in7vzXmNsPGoNcveAoKJ1uNWRIn+bxbG5diH/prggiWLQwC4GeVV+AoHHFTMZ SCBRH5m1aLtsIhcu/oqDuHHlE3eWvjPLNFSEndCAkwLKMyT/hGiUpjJV3Snn9Eq3/FCr 2XJT/VwnoaYf7PghZ4tjc4A1F1UyDefNexaz8itSMamXU5IgDBLaHyKAGq+vmke54AP8 Vhiw== X-Gm-Message-State: AO0yUKXfY2NiFqXHzottFlX0FF7mBwJKQf2pRar7LmiqAbNwnxtBrStB qyCiYkyblY+/YYc9u6opH6BAsS7z9ds= X-Google-Smtp-Source: AK7set+FrHBaISdoKyBhlm16RB1k1fS85oXZgChMk6X7OHtlJCKXP3ilsV7AkEBxHuC2EK/Tm0p1Jw== X-Received: by 2002:aa7:c983:0:b0:4ac:cf29:1a6a with SMTP id c3-20020aa7c983000000b004accf291a6amr6035702edt.20.1676564372871; Thu, 16 Feb 2023 08:19:32 -0800 (PST) Received: from ars3 ([2a02:8109:8ac0:56d0::6fd0]) by smtp.gmail.com with ESMTPSA id y36-20020a50bb27000000b004ac54d4da22sm1079959ede.71.2023.02.16.08.19.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 08:19:32 -0800 (PST) From: Augusto Stoffel Date: Thu, 16 Feb 2023 17:19:30 +0100 Message-ID: <87a61dfur1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. As a more concrete example, when clicking the "File -> Close" menu item in a modified buffer, I would expect a to always get a dialog box for the "buffer modified, kill anyway?" question. (assuming of course use-dialog-box is t). Currently, one gets a minibuffer query by default. This change from mouse interaction to keyboard interaction seems unexpected to me. From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Feb 2023 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Augusto Stoffel Cc: 61553@debbugs.gnu.org Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.167657035910484 (code B ref 61553); Thu, 16 Feb 2023 18:00:02 +0000 Received: (at 61553) by debbugs.gnu.org; 16 Feb 2023 17:59:19 +0000 Received: from localhost ([127.0.0.1]:37637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSiXO-0002j1-NW for submit@debbugs.gnu.org; Thu, 16 Feb 2023 12:59:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSiXN-0002ip-Ga for 61553@debbugs.gnu.org; Thu, 16 Feb 2023 12:59:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSiXI-0004oX-6N; Thu, 16 Feb 2023 12:59:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=umTJl0N9UQWKZkU6JNzaKIa92eozz3s9TQL1ZrjICic=; b=MFqg56lfiuH/ wl5mpIaCDb7dkYd5TUHZY2NyHW8AhEKc2hXp8pouOztsJH8HhRlx4q7nfPFWrQ3H1g0OmfbKrVLsH okzb9t7HW46n78+aURbQX7i8jvscIBSgvNaUIwlZg/I+STy3A2RPut9mAvqQoiCOMOaKZ0PoRxOiD I0TCk7P3W20aXBtDiXjnmd1TKwEgMXA5AXAK4GDWu7JxT+3p8luKqAQCqg0mWtG51MxsQxx26eFu1 sCerc1kPuF79h7FyExHm2H2EN75z8gf6Tn1uyMvcwHGHGUGE/gYHzJFWWJ44zdUFJPqzeDqhXkq9p rQQ1XHmjBoCcie2dQhDOSw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSiXH-0004PT-E6; Thu, 16 Feb 2023 12:59:11 -0500 Date: Thu, 16 Feb 2023 19:59:08 +0200 Message-Id: <83edqp330z.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a61dfur1.fsf@gmail.com> (message from Augusto Stoffel on Thu, 16 Feb 2023 17:19:30 +0100) References: <87a61dfur1.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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?). > As a more concrete example, when clicking the "File -> Close" menu item > in a modified buffer, I would expect a to always get a dialog box for > the "buffer modified, kill anyway?" question. (assuming of course > use-dialog-box is t). Currently, one gets a minibuffer query by > default. This change from mouse interaction to keyboard interaction > seems unexpected to me. Does the patch below give good results in that case? diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el index 542c965..8ab1f86 100644 --- a/lisp/emacs-lisp/rmc.el +++ b/lisp/emacs-lisp/rmc.el @@ -177,8 +177,9 @@ read-multiple-choice prompt choices help-string show-help))) (defun read-multiple-choice--short-answers (prompt choices help-string show-help) - (let* ((prompt-choices - (if show-help choices (append choices '((?? "?"))))) + (let* ((dialog-p (use-dialog-box-p)) + (prompt-choices + (if (or show-help dialog-p) choices (append choices '((?? "?"))))) (altered-names (mapcar #'rmc--add-key-description prompt-choices)) (full-prompt (format @@ -192,11 +193,12 @@ read-multiple-choice--short-answers (setq buf (rmc--show-help prompt help-string show-help choices altered-names))) (while (not tchar) - (message "%s%s" - (if wrong-char - "Invalid choice. " - "") - full-prompt) + (unless dialog-p + (message "%s%s" + (if wrong-char + "Invalid choice. " + "") + full-prompt)) (setq tchar (if (and (display-popup-menus-p) last-input-event ; not during startup diff --git a/lisp/simple.el b/lisp/simple.el index c58acfe..d0ba7dc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10799,7 +10799,8 @@ kill-buffer--possibly-save '((?y "yes" "kill buffer without saving") (?n "no" "exit without doing anything") (?s "save and then kill" "save the buffer and then kill it")) - nil nil (not use-short-answers))))) + nil nil (and (not use-short-answers) + (not (use-dialog-box-p))))))) (if (equal response "no") nil (unless (equal response "yes") From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice 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 X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 61553@debbugs.gnu.org Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.167657260613835 (code B ref 61553); Thu, 16 Feb 2023 18:37:02 +0000 Received: (at 61553) by debbugs.gnu.org; 16 Feb 2023 18:36:46 +0000 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 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 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) 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) From: Augusto Stoffel In-Reply-To: <83edqp330z.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Feb 2023 19:59:08 +0200") References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> Date: Thu, 16 Feb 2023 19:36:36 +0100 Message-ID: <875yc1foej.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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. From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Feb 2023 20:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Augusto Stoffel Cc: 61553@debbugs.gnu.org Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.167657864824109 (code B ref 61553); Thu, 16 Feb 2023 20:18:02 +0000 Received: (at 61553) by debbugs.gnu.org; 16 Feb 2023 20:17:28 +0000 Received: from localhost ([127.0.0.1]:37724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSkh5-0006Gn-JB for submit@debbugs.gnu.org; Thu, 16 Feb 2023 15:17:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSkh4-0006Ga-13 for 61553@debbugs.gnu.org; Thu, 16 Feb 2023 15:17:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSkgy-0008Qo-G2; Thu, 16 Feb 2023 15:17:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bkdghUKQMZX/YN0k8RY+9IOXHydDgMGdUcF2izYu04k=; b=BGJ4FgiSC2rd cqFqYIeYcmWtsj0LJNkAqoWXZrZPfbArv9i3/OtIOpdqAgXOGd1aGRWlKNItyNpt7zKFCFXSCwxqO 9x0su7f2Sq4r0E75tLLK6l65xEQ5NKTZl4Yp0e7np65qPFDV1ha60m3TiHVoU8jW8kwEJ5z/dg/Oq 0ZrmL3k6qWWcIWzqeEde2pUlTe8pn+IW73Kccw6e8ZmYGuq5wO8eng1tN3516CL+g9fZ4Cdfd7zjH u/p+G0aQNWJ0eL7ggsl4jl/BRkBM1No7+uhVVorbhaVll0d5ctcgTjzrk9PsBOuyWMGBlVU4JmfTr 3fZ3p6qtSMqRhd2XW9BcWg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSkgx-0003w5-Vj; Thu, 16 Feb 2023 15:17:20 -0500 Date: Thu, 16 Feb 2023 22:17:18 +0200 Message-Id: <83a61d2wmp.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <875yc1foej.fsf@gmail.com> (message from Augusto Stoffel on Thu, 16 Feb 2023 19:36:36 +0100) References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> <875yc1foej.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Augusto Stoffel > 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). From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2023 10:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Augusto Stoffel , 61553@debbugs.gnu.org Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.167662945914334 (code B ref 61553); Fri, 17 Feb 2023 10:25:01 +0000 Received: (at 61553) by debbugs.gnu.org; 17 Feb 2023 10:24:19 +0000 Received: from localhost ([127.0.0.1]:38547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSxud-0003j7-9H for submit@debbugs.gnu.org; Fri, 17 Feb 2023 05:24:19 -0500 Received: from mail-wm1-f44.google.com ([209.85.128.44]:42506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSxub-0003is-HK for 61553@debbugs.gnu.org; Fri, 17 Feb 2023 05:24:17 -0500 Received: by mail-wm1-f44.google.com with SMTP id ja15-20020a05600c556f00b003dc52fed235so485347wmb.1 for <61553@debbugs.gnu.org>; Fri, 17 Feb 2023 02:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=fzDfoTlxslssXsTw6zw1NtDq5GufntNPipQ2u6xttvw=; b=mfyjkId+0DS+M8RymRXTRw9BkEY308gOjxzDMmlRwTYjfBVQO6WXNgdqI399UJj+GH yYkqyFncpXFwWXgYHLYCf/lAJKzmDdrhzseMbcogxdA7mIcvaioNy07rEy5dnUEEntaJ yC6Yx1pWj/Wu5HBKLhotrWafNwhwNlyDHO+Myl08YKvVxJ7rowf2sCCddcj6ihH3jbCY TyUhCNnth501l0TgV+XYaHERMoRomGENCstngAoqjSzKwJT1SdQKQo2GGapKgBxWWo/W Gj8ZME9n/cFlEAF5B/+feZ82e8L9CsVchJXDt7F6Z2BCLHG84W8t6SKrjfZW5zP7EsvS IqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version: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=fzDfoTlxslssXsTw6zw1NtDq5GufntNPipQ2u6xttvw=; b=XbDa3M48ceE8pQ7RbxrWyqz7dzaij6QWzfWWSHyfB+r4BNxZNRTawyy+T6lvWLFPtH /lJsER3fZnyPwG2CZLeUQVBwq++fEixmFg7rWiKIgAi4dlRj4fCME5z0bTpTSX4TpHmD EKiFKZ7c0rALmVyej3Mo0UQssMmBPLUiyLzibIRjh+zmgltokQREaGqSZB3ymlt+wFMk f2mwNwKxja2qnvwfbtiuf6JZzhIwol80KNTDuOpjZj2oQtGvITlnVaTwfQ9KolL8xjBz wthjhJv5wBxteqcOEdijMdsp+gc6h40tS5BzrRbtsf/tw+v1jMeLcm4TtkAxnhlAVXeX nafg== X-Gm-Message-State: AO0yUKUPMsZjQMY0ouTTQnfZaMTklvwIavxkLRSsnfZlpDlXm+3LVX3n 7+Mc2MvRID1VNpH8ssC3d+LFLI8nvbE= X-Google-Smtp-Source: AK7set9OVgseAt3d7QSBWIaEmSL5/cPefB52gqfOHjWHj6+aY9XA6fmMzT6NP1e6xfoJaPmlEHTYWQ== X-Received: by 2002:a05:600c:3095:b0:3dc:555c:dd30 with SMTP id g21-20020a05600c309500b003dc555cdd30mr6856524wmn.27.1676629451092; Fri, 17 Feb 2023 02:24:11 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id z23-20020a7bc7d7000000b003e2096da239sm5570665wmk.7.2023.02.17.02.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:24:10 -0800 (PST) From: Robert Pluim In-Reply-To: <83a61d2wmp.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 16 Feb 2023 22:17:18 +0200") References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> <875yc1foej.fsf@gmail.com> <83a61d2wmp.fsf@gnu.org> Date: Fri, 17 Feb 2023 11:24:09 +0100 Message-ID: <87a61c37zq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Thu, 16 Feb 2023 22:17:18 +0200, Eli Zaretskii said: >> 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. Eli> I disagree that rmc.el should make that decision. It isn't its call Eli> (pun intended). If we do this then we need to modify the docstring of `read-multiple-choice', which explicitly defines the current behaviour: When `use-dialog-box' is t (the default), and the command using this function was invoked via the mouse, this function pops up a GUI dialog to collect the user input, but only if Emacs is capable of using GUI dialogs. Otherwise, the function will always use text-mode dialogs. The return value is the matching entry from the CHOICES list. If LONG-FORM, do a `completing-read' over the NAME elements in CHOICES instead. Although perhaps we could clarify it: If LONG-FORM, always do a `completing-read' over the NAME elements in CHOICES instead, regardless of the value of `use-dialog-box'. Robert -- From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2023 12:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Robert Pluim Cc: arstoffel@gmail.com, 61553@debbugs.gnu.org Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.16766370774209 (code B ref 61553); Fri, 17 Feb 2023 12:32:01 +0000 Received: (at 61553) by debbugs.gnu.org; 17 Feb 2023 12:31:17 +0000 Received: from localhost ([127.0.0.1]:38668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSztV-00015p-33 for submit@debbugs.gnu.org; Fri, 17 Feb 2023 07:31:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSztS-00015c-Cs for 61553@debbugs.gnu.org; Fri, 17 Feb 2023 07:31:15 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSztM-0005aG-Uo; Fri, 17 Feb 2023 07:31:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sPlW67bzM1kEbW3eFTvQy3pgtnSGf+hHj/AT3c/nlog=; b=VsdqEr6HK7s8 hYAaPWVKLoRnlDFfJ/+7DbDOwSNXWAUOGeipM/KrrPO2bDC0lF2QNPHiz5SDYHIGmEgGlSCP7Het1 R1YvNctNsBbw0ou4VBTc/OxF9beg/QG5qylLjNDD4efkV033OowKhv3eL0SUL5PwkDZJClgFMnzrz 5tNSk0jt9ZJK88NrKK41H3l5Y9Ee+P2YDWBdF147o1C3Cj+PUlQvJbthRY9MAl2kwl8OmaFFvds48 BlalbmQPOfVn5VA2IwdD+3o9UuPqDfvRflciY4Y24A61MvWfoi+7Y1+mtPqt3DpI7wHjx7y31d7RY rC/G8PrWj1/7LFVwmG8ixw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSztM-0005Qa-21; Fri, 17 Feb 2023 07:31:08 -0500 Date: Fri, 17 Feb 2023 14:31:06 +0200 Message-Id: <83h6vk1njp.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a61c37zq.fsf@gmail.com> (message from Robert Pluim on Fri, 17 Feb 2023 11:24:09 +0100) References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> <875yc1foej.fsf@gmail.com> <83a61d2wmp.fsf@gnu.org> <87a61c37zq.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Robert Pluim > Cc: Augusto Stoffel , 61553@debbugs.gnu.org > Date: Fri, 17 Feb 2023 11:24:09 +0100 > > >>>>> On Thu, 16 Feb 2023 22:17:18 +0200, Eli Zaretskii said: > > >> 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. > > Eli> I disagree that rmc.el should make that decision. It isn't its call > Eli> (pun intended). > > If we do this then we need to modify the docstring of > `read-multiple-choice', which explicitly defines the current > behaviour: > > When `use-dialog-box' is t (the default), and the command using this > function was invoked via the mouse, this function pops up a GUI dialog > to collect the user input, but only if Emacs is capable of using GUI > dialogs. Otherwise, the function will always use text-mode dialogs. > > The return value is the matching entry from the CHOICES list. > > If LONG-FORM, do a `completing-read' over the NAME elements in > CHOICES instead. Where exactly is the above wrong? The only problem I found in that function is that it evidently was never actually tested with GUI dialogs, because trying to do that revealed at least two (albeit minor) issues with what it did in that case. Both of them are solved in the patch I proposed. > Although perhaps we could clarify it: > > If LONG-FORM, always do a `completing-read' over the NAME elements in > CHOICES instead, regardless of the value of `use-dialog-box'. Oh, you assume that the reader will not understand that completing-read cannot possibly use GUI dialogs? I'm okay with saying that explicitly, although someone who uses these APIs must already realize that. From unknown Fri Jun 13 11:04:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2023 12:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61553 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: arstoffel@gmail.com, 61553@debbugs.gnu.org Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.16766377645450 (code B ref 61553); Fri, 17 Feb 2023 12:43:01 +0000 Received: (at 61553) by debbugs.gnu.org; 17 Feb 2023 12:42:44 +0000 Received: from localhost ([127.0.0.1]:38730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT04a-0001Pq-AE for submit@debbugs.gnu.org; Fri, 17 Feb 2023 07:42:44 -0500 Received: from mail-wm1-f43.google.com ([209.85.128.43]:42782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT04Y-0001Pb-VO for 61553@debbugs.gnu.org; Fri, 17 Feb 2023 07:42:43 -0500 Received: by mail-wm1-f43.google.com with SMTP id ja15-20020a05600c556f00b003dc52fed235so753608wmb.1 for <61553@debbugs.gnu.org>; Fri, 17 Feb 2023 04:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KvJqKpDwc/HdWy+7ssv2AzvmSLedIF/1IlD0XkHC4KM=; b=R48Z/pO4OjoLPIsxFQrW2lH7tepwrfltdZN5jNLj+p3LrRkIuDR/Sl5laRyrlQJzOG YDQDL27E1zKdEHk2XUu69WB+IZKEqTi3evPtiACRudXG/SeoSCZmIitb5CHJliKxyaIs J6aLpjue39YWopgY06gIziKK22odp1jqImpUVvq32BracVl/hxsXLwOF4T1G8+xLiI0P 5w2CJmp+JCu770GR3eX6e9pC9B2jPuTetcyaoj8aIo5Yrzkfu3dRHB+D7TJD2+Hq4YdT WsIIuxYji+p416a+6wDj3nvUjDN1hP8yfY4txDuhCzsBu/CgaMvQjNqKb6buBmt4e7u6 2hPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version: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=KvJqKpDwc/HdWy+7ssv2AzvmSLedIF/1IlD0XkHC4KM=; b=c5ukbiWpXw3oZN1Pl92ixRrPUYou6kFfXd9Kx6KWZ5zzEDYaJtT4rmCqI9dXn4JTnP GiG0Zi/J9i20eMQ4VMzH+AA4krKaZNN9BONN+AKp1Gq+FXKDw4Mftu34D78ugrzs58/m mOj+uhS4Si4yl7FvMDdDbWC6SLXBbO9rWR1Kk3fOBJqmvb1zdKiBAKs42aBCUT5NutGO LArnSno9SL9aP3IRyLu8yxYu7X5by29hCIe9+3ceEjCUQsGQiXRqQvzOofw3KfUkikZT 3VrJidWcy02GxVHnEg4mt1loXMLmqVIbft5lPNbDqYkDvdv/MgIAJeBoAViO3Zlzkouv xe3Q== X-Gm-Message-State: AO0yUKX2ZUyafNISd888nKtAlokE4H2Zuqf+Bt1jQgE8U0mJHKtdVVB6 Crp4x2Jj8qDDhnc3MM24QEJDs0b7dTE= X-Google-Smtp-Source: AK7set/P6SxSU/YRxhglM3xmQvIwoTweZOD8f1H+2+IPIY+QTps7cXF+bsm18UJL4nOLqXFwZFU6yw== X-Received: by 2002:a05:600c:2b45:b0:3df:ee44:e45a with SMTP id e5-20020a05600c2b4500b003dfee44e45amr1017255wmf.15.1676637756164; Fri, 17 Feb 2023 04:42:36 -0800 (PST) Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id m26-20020a05600c3b1a00b003e21a8d30c9sm4004860wms.37.2023.02.17.04.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 04:42:35 -0800 (PST) From: Robert Pluim In-Reply-To: <83h6vk1njp.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Feb 2023 14:31:06 +0200") References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> <875yc1foej.fsf@gmail.com> <83a61d2wmp.fsf@gnu.org> <87a61c37zq.fsf@gmail.com> <83h6vk1njp.fsf@gnu.org> Date: Fri, 17 Feb 2023 13:42:35 +0100 Message-ID: <87o7ps1n0k.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> On Fri, 17 Feb 2023 14:31:06 +0200, Eli Zaretskii said: >> From: Robert Pluim >> Cc: Augusto Stoffel , 61553@debbugs.gnu.org >> Date: Fri, 17 Feb 2023 11:24:09 +0100 >>=20 >> >>>>> On Thu, 16 Feb 2023 22:17:18 +0200, Eli Zaretskii said: >>=20 >> >> So instead of adding a special case for kill-buffer, I would rath= er >> >> 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. >>=20 Eli> I disagree that rmc.el should make that decision. It isn't its ca= ll Eli> (pun intended). >>=20 >> If we do this then we need to modify the docstring of >> `read-multiple-choice', which explicitly defines the current >> behaviour: >>=20 >> When `use-dialog-box' is t (the default), and the command using this >> function was invoked via the mouse, this function pops up a GUI dial= og >> to collect the user input, but only if Emacs is capable of using GUI >> dialogs. Otherwise, the function will always use text-mode dialogs. >>=20 >> The return value is the matching entry from the CHOICES list. >>=20 >> If LONG-FORM, do a `completing-read' over the NAME elements in >> CHOICES instead. Eli> Where exactly is the above wrong? It=CA=BCs not wrong, it just could be clearer. Eli> The only problem I found in that function is that it evidently was Eli> never actually tested with GUI dialogs, because trying to do that Eli> revealed at least two (albeit minor) issues with what it did in th= at Eli> case. Both of them are solved in the patch I proposed. >> Although perhaps we could clarify it: >>=20 >> If LONG-FORM, always do a `completing-read' over the NAME elements in >> CHOICES instead, regardless of the value of `use-dialog-box'. Eli> Oh, you assume that the reader will not understand that Eli> completing-read cannot possibly use GUI dialogs? I'm okay with sa= ying Eli> that explicitly, although someone who uses these APIs must already Eli> realize that. I had to read it carefully to realize that the 'instead' referred to the use of dialogs. Robert --=20 From unknown Fri Jun 13 11:04:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Augusto Stoffel Subject: bug#61553: closed (Re: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice) Message-ID: References: <834jrixaol.fsf@gnu.org> <87a61dfur1.fsf@gmail.com> X-Gnu-PR-Message: they-closed 61553 X-Gnu-PR-Package: emacs Reply-To: 61553@debbugs.gnu.org Date: Sun, 19 Feb 2023 09:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1676799182-22631-1" This is a multi-part message in MIME format... ------------=_1676799182-22631-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 61553@debbugs.gnu.org. --=20 61553: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61553 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1676799182-22631-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 61553-done) by debbugs.gnu.org; 19 Feb 2023 09:32:29 +0000 Received: from localhost ([127.0.0.1]:45690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTg3Z-0005s8-7U for submit@debbugs.gnu.org; Sun, 19 Feb 2023 04:32:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTg3X-0005ru-Bx for 61553-done@debbugs.gnu.org; Sun, 19 Feb 2023 04:32:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTg3S-0002Su-2D; Sun, 19 Feb 2023 04:32:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=j6pIpqgQlCTV1VCKEzdu/ayfm87qbMSv8SHtkQI+5XY=; b=pFVP+XW+U0by 3nM5DOu6NVJF4ANlIICg8CBcxJ6OD+19kvkSaV+l4o7VnGlz7LoKE9jVuw8F8oJM+TDNy3py7He1w I+v+xreTR1MMFaYJYiraTWeWDd2MOrmbRTI4DDtIT/hNAlx287XQ9lXcbGnjDnjI4g1bYdQ7mSsCX MlBASpcz6R+beDdInXAmiLR1FNabWS9263gdxvijI+g7usQS4zPXguvODY5xymfjZdkuso0OZBUWE 9b7wRJHuvAzO7YyCGsM6N0fHXdjZ/DWcNNnAyG1db/MeanVMbWAOZIc0PJVgEYNHuCna5J4zQtqWV 7/3JkOrMOR8h7b8ZuLlGlQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTg3R-0005xr-CT; Sun, 19 Feb 2023 04:32:21 -0500 Date: Sun, 19 Feb 2023 11:32:26 +0200 Message-Id: <834jrixaol.fsf@gnu.org> From: Eli Zaretskii To: arstoffel@gmail.com, Robert Pluim In-Reply-To: <83a61d2wmp.fsf@gnu.org> (message from Eli Zaretskii on Thu, 16 Feb 2023 22:17:18 +0200) Subject: Re: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice References: <87a61dfur1.fsf@gmail.com> <83edqp330z.fsf@gnu.org> <875yc1foej.fsf@gmail.com> <83a61d2wmp.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61553-done Cc: 61553-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 61553@debbugs.gnu.org > Date: Thu, 16 Feb 2023 22:17:18 +0200 > From: Eli Zaretskii > > > From: Augusto Stoffel > > 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). No further comments, so I've now installed the proposed change on the emacs-29 branch, and I'm closing this bug. > From: Robert Pluim > Cc: arstoffel@gmail.com, 61553@debbugs.gnu.org > Date: Fri, 17 Feb 2023 13:42:35 +0100 > > Eli> Oh, you assume that the reader will not understand that > Eli> completing-read cannot possibly use GUI dialogs? I'm okay with saying > Eli> that explicitly, although someone who uses these APIs must already > Eli> realize that. > > I had to read it carefully to realize that the 'instead' referred to > the use of dialogs. I've made this aspect more explicit in the doc string, thanks. ------------=_1676799182-22631-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Feb 2023 16:19:53 +0000 Received: from localhost ([127.0.0.1]:37468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgzB-0008Rl-Gf for submit@debbugs.gnu.org; Thu, 16 Feb 2023 11:19:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:55718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSgzA-0008Rd-12 for submit@debbugs.gnu.org; Thu, 16 Feb 2023 11:19:52 -0500 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 1pSgz9-0000wo-KO for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 11:19:51 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSgz6-00057B-Ik for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2023 11:19:51 -0500 Received: by mail-ed1-x52b.google.com with SMTP id d40so4815879eda.8 for ; Thu, 16 Feb 2023 08:19:34 -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:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=2hPZxxKwpgwooSoGPQvvI5Zt2Fn9QPydPHdgUGd1H6Q=; b=ivprPw1S75XeDV2V/kcWsQzcRGL3aUFlLStciQk7Dk5H8WnNeA8GyPiBQbzd7x9cTD oKlkE8mHfKE8AqYMFg3z9IW5NMpkY6U4dLq1t/bkR48syQOJAPjWe6uYz2kJORNli8Fs PJHW0Ja87puPQGnnmcgkW5W+svIOi+wRNw5dyzXJqxYiPfFpypawzBKNrXgwOoNrNFm1 Cgb5rxbxLRjAhLIp/7nKbAPqEvyFB8lndS66gKdLI2FzRr7Bj1EAbBt8XEhiMVfd69vb GJh6wJEjRBsEoR4O4K8OaXSYVMFi3ApfJuX0EJsTV8Xv6szoGTRhw2WpSCiu9fp/DmrP 8HQA== 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:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2hPZxxKwpgwooSoGPQvvI5Zt2Fn9QPydPHdgUGd1H6Q=; b=2kpQ0AShGLMeAXfCTHO2jbZ7uYZwzDJNH8OyYLse/Uf9RAT2ZE4ocoeIhbR/o/3B7v JbHRQBKD9yx/5/EZldCqvaPNAYK5HgzjSmUGlZqOKRKKwqdaXFt9kNE+KaJWVFXutoy5 Dh+Idp5in7vzXmNsPGoNcveAoKJ1uNWRIn+bxbG5diH/prggiWLQwC4GeVV+AoHHFTMZ SCBRH5m1aLtsIhcu/oqDuHHlE3eWvjPLNFSEndCAkwLKMyT/hGiUpjJV3Snn9Eq3/FCr 2XJT/VwnoaYf7PghZ4tjc4A1F1UyDefNexaz8itSMamXU5IgDBLaHyKAGq+vmke54AP8 Vhiw== X-Gm-Message-State: AO0yUKXfY2NiFqXHzottFlX0FF7mBwJKQf2pRar7LmiqAbNwnxtBrStB qyCiYkyblY+/YYc9u6opH6BAsS7z9ds= X-Google-Smtp-Source: AK7set+FrHBaISdoKyBhlm16RB1k1fS85oXZgChMk6X7OHtlJCKXP3ilsV7AkEBxHuC2EK/Tm0p1Jw== X-Received: by 2002:aa7:c983:0:b0:4ac:cf29:1a6a with SMTP id c3-20020aa7c983000000b004accf291a6amr6035702edt.20.1676564372871; Thu, 16 Feb 2023 08:19:32 -0800 (PST) Received: from ars3 ([2a02:8109:8ac0:56d0::6fd0]) by smtp.gmail.com with ESMTPSA id y36-20020a50bb27000000b004ac54d4da22sm1079959ede.71.2023.02.16.08.19.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 08:19:32 -0800 (PST) From: Augusto Stoffel To: bug-gnu-emacs@gnu.org Subject: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Date: Thu, 16 Feb 2023 17:19:30 +0100 Message-ID: <87a61dfur1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=arstoffel@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. As a more concrete example, when clicking the "File -> Close" menu item in a modified buffer, I would expect a to always get a dialog box for the "buffer modified, kill anyway?" question. (assuming of course use-dialog-box is t). Currently, one gets a minibuffer query by default. This change from mouse interaction to keyboard interaction seems unexpected to me. ------------=_1676799182-22631-1--