From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#61553: 29.0.60; Inconsistent use of dialog boxes by read-multiple-choice Date: Fri, 17 Feb 2023 13:42:35 +0100 Message-ID: <87o7ps1n0k.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28989"; mail-complaints-to="usenet@ciao.gmane.io" Cc: arstoffel@gmail.com, 61553@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 17 13:43:23 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 1pT05C-0007Mo-Jx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Feb 2023 13:43:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pT04w-0006uw-Cb; Fri, 17 Feb 2023 07:43:06 -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 1pT04t-0006oZ-2q for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 07:43:03 -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 1pT04r-0001xp-TM for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 07:43:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pT04r-0001QN-PX for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 07:43:01 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 61553-submit@debbugs.gnu.org id=B61553.16766377645450 (code B ref 61553); Fri, 17 Feb 2023 12:43:01 +0000 Original-Received: (at 61553) by debbugs.gnu.org; 17 Feb 2023 12:42:44 +0000 Original-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 Original-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 Original-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) Original-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) In-Reply-To: <83h6vk1njp.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Feb 2023 14:31:06 +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:255883 Archived-At: >>>>> 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