From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#52877: [External] : Re: bug#52877: 27.2; Let `use-dialog-box' apply to more than just yes/no questions Date: Sun, 16 Jan 2022 22:13:35 +0000 Message-ID: References: <87r199wc44.fsf@gnus.org> <83bl0cysh1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30282"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "larsi@gnus.org" , "52877@debbugs.gnu.org" <52877@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 16 23:14:33 2022 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 1n9DnE-0007gX-D4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Jan 2022 23:14:32 +0100 Original-Received: from localhost ([::1]:35228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9DnC-0003ZG-SK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Jan 2022 17:14:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9Dmk-0003Z4-2y for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2022 17:14:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9Dmj-0005HY-Pz for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2022 17:14:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n9Dmj-0002KB-MO for bug-gnu-emacs@gnu.org; Sun, 16 Jan 2022 17:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Jan 2022 22:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52877 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 52877-submit@debbugs.gnu.org id=B52877.16423712248904 (code B ref 52877); Sun, 16 Jan 2022 22:14:01 +0000 Original-Received: (at 52877) by debbugs.gnu.org; 16 Jan 2022 22:13:44 +0000 Original-Received: from localhost ([127.0.0.1]:44378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9DmR-0002JX-Hv for submit@debbugs.gnu.org; Sun, 16 Jan 2022 17:13:44 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:12220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9DmO-0002JO-9m for 52877@debbugs.gnu.org; Sun, 16 Jan 2022 17:13:42 -0500 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20GBJF7k023002; Sun, 16 Jan 2022 22:13:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=4WYIhWUydvYT0VRpkWeoEKQHQjDGaD6BY5ek8Hx1P+E=; b=ROjdwIQGRuGAJUtBPSz9EokmL6v0PD7uArN3CFD1W4OEX6BARBh3nv08uURrCROaIJIj WL3XyLPqoh+PqM3C1oRfl+A/0UHBxCFyhxaKBlYZu4kWgxIay8J/xL809q6t++NYRChr 7iD2qZ/lH7UyVtJLdPnXfhFS47ArW7Wq4DkAL9ByUIR/x+Oc7U/FBLa8mReaFnlbtShj itfc21wAbfnZeKXDB1mtJH2XU2K8Mnh5n91Xoxh2BCpuOxe0LJUF8Wanml3rxRpox5Vu rE5JgWJF4sSVlGPQmPwuJH8jZGi1qOPrFrUEYUXWbGwnJWbTVJ2WsBcZH9EFs4v8VVxZ ww== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3dkn22t64r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Jan 2022 22:13:39 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 20GMAj2b186496; Sun, 16 Jan 2022 22:13:38 GMT Original-Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by aserp3030.oracle.com with ESMTP id 3dkma9xu4w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 16 Jan 2022 22:13:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VB1uvp/UBCJ6HeU1QgNxExN7Df2Fn2XfCbe93YPBimfVQE0fqZwqSW+go9mfG9/K3+5oJwjmFIzk9faoZu1V6JnWDbd+ktF6/dQBkovNQ6n/53DTMjtqJS8urqAc3Xo8S/cbNL85ObmXGUugYQY6qd2RHvhET5BnMa2/nrIgs+8b2jX2h+AnFVyHiJ5jshyHPIBc1nLRauRAlP+sHIftw7lXKfyZ6YClQorftdr0zqg2DjhC8EEGwAxwB7K1Zn5CGlJDtLy0cUhfW8KdK9KiLrOGWPrKttJ4u+pltYnyqDQ4gqnfb6j1MYJGdUzbOvVkJ6JP7+Ipnj5ZKYujW3MIQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4WYIhWUydvYT0VRpkWeoEKQHQjDGaD6BY5ek8Hx1P+E=; b=FsntIeuXfgwYmCWC7i0M3lMCgPfm9y4d1s3qI0V007LwZvn40DAO23UXhp0NUnrJrQPJKbS2T6YjG01f01G0mUk78wj1wIxrbMlB4eS9+x6IfzCUuHuleFac22bQKaNx5Yf7zPvrc5l6acEr1kmAz978q/8saVilqNvpx/G35ZWtGr538rydtE2Q7ax2MzUgPblAHdAcZuv2uX1geOL78EC3z/k8wefXhuun08g9iKir124x0mczIUmpt13aPmsVCZUR+BEN5kRoq81J1wZGu/jq6kCsWNKZrvLen4wMzYe4cTq1J9qNx5KOjbI6GDQDFf2aShkLO8VnyRE174BOUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4WYIhWUydvYT0VRpkWeoEKQHQjDGaD6BY5ek8Hx1P+E=; b=bEUTLd6hTT/nCsJzoZdMrzdMAP/M+osNNEe8kABQAzUldAxtkIgiwCebRfBsIwzP5zlm31mV5FjGAkstZHjayz6AK7LjYgFyAnu9Hsfk7eq+Iz2FoFEfbq11eKd++NeuUtfdd8U1aq+SmDLKNa36kCNbE4An9gvV2iZfgCXg/+4= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by DM6PR10MB4027.namprd10.prod.outlook.com (2603:10b6:5:1fb::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.12; Sun, 16 Jan 2022 22:13:36 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::99a4:696f:5f30:36b3]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::99a4:696f:5f30:36b3%7]) with mapi id 15.20.4888.013; Sun, 16 Jan 2022 22:13:35 +0000 Thread-Topic: bug#52877: [External] : Re: bug#52877: 27.2; Let `use-dialog-box' apply to more than just yes/no questions Thread-Index: Adf83BGvgz7Hu9fcTX2mlrN80W/EjwN2hu6HABsR60A= In-Reply-To: <83bl0cysh1.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 925cedc6-2a87-4334-f545-08d9d93d70d1 x-ms-traffictypediagnostic: DM6PR10MB4027:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HsWAWx1w4rWFzjhjUlfhP7piyrPjFMtMELGwLzuSC4AITCMa3jEaiuhkefvGmG9DThAsXInR4cd6aC8c5gpceFQFifc5VoJ/USXDaDqrxvjfyQZL3GXreIeAXrvHCVvc7Qp9Wdgdtthcx5VQt2uNvJxiatQzKXoWS1w+gyT78VBRzZFN/D3DEbUo/LzdUmwmUmPWOROj83JpbnGEF7rqrBInEQIrpKm+gW2djhF7UaWFFBy38WAfujNaaAM7bSoHlzvooYR0iUYeFWn5Rv1WYFPkF9OYbMexMqtdXnMgsUB7g7xJhtIMLgazMwVPxcA6IEdASSqYt08p9FqGehag7PB4OXOFjoxtahQUWATGhb68dw7NN0PDwe6bXh4Li6N6TzFNX4TWObgN+geqaGAwRg1FAR+Jgj/ntiVAVB6zBwJQ9+Z1+2epmF06ZVSanVIcp5WnD/MRsb3++527r6nIcT1lS25YHjIOn4waTLIRAEzCdERXFM4pnUsdGuE2B24zxAcoKWMUJhAGcR0nGN7Hm2jTU7spr+eHo9qQwRCSALZiQ7lUmHlGkgLGhApK2L6f69Zy+X/KPLAfhEombLE9UxH6qZCM9XTa+GKUdWfH6ZDUr/Rfx+OhgeiI2LhEflM3ja8HECjw40/WnBnALMIdyzWMsZQevSL9VM19IPfCdLRtdLOZ6Sni3oZ6mEYkfXNO9Rqf5PN+Amlc6ZBVs1k3jpCRA7DhC7/t1t6c0cscsyk= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(55016003)(83380400001)(54906003)(8936002)(6916009)(186003)(52536014)(33656002)(86362001)(38100700002)(122000001)(2906002)(66946007)(66446008)(508600001)(7696005)(26005)(66556008)(64756008)(38070700005)(316002)(76116006)(9686003)(66476007)(71200400001)(6506007)(5660300002)(8676002)(44832011)(4326008)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: XzrM1lr2+6V0vWoxiHz7fCF22tXMcp7saztQywcUeGZCcvwNw1rBB9n+erX7KkvqPyCkTfT2lQXFhaPaDSogqOtAxVOkuHs2UwuBnueXJkt4flc90ZIsACrQtK2kgt1teehb1c/0F2O9RL5Uko+8231FP5Ld59dyCl5TJuT0CGR7YEmLgXYxwCD2LuOxLpDopLWG8qGBmsm8GPWPCixORGmA7pZ8tX1jIcJhBxbZAV2AyKac+h0jW8S4KRavAdCisNwNPpuHF4cQPRnK6kKrF22ToGDmxjUg0jt+S08Tb/rfm03l5anDOQMBpGxFd3RJ6DKStYxpsQvR8W45sVWbYGNAuK3YBPjHgZ+KS1qHwpXl54M0SZWUbKHuGSTVB687zDqpQSmv5QxyNOlnN1FW5hVuHTcYM6Udc5lWm1Z/vZgZtlBWF1699ENMRQeO8WedB62XvgS70R664AuG9CK+03F02RB8MCouzF8PmCekopMfAPuFLbbpFpafH/jfgdeFs2XkoNgdCKe4LlUyp7997isLbYHYmzb3/qPqcb4etxDpRDK/xoJwZv8AC4gF9niMkuD4qZaxWEsINhAQjwIBQd3vthClsswCmFBdl2PGr9IqtcSAlcGM8a1e4h6QtBAQ+Ce5u08Dl6GmCOhbIT5quwMsTsLqvCJGmqACfBmXes/Y0w/hxVKmwI1ABLiDlhH+lUkq62VunW2vIvlgawpFSsN4jtG8GDwf5OLMJd5Bo+arMrI+b0+fX0Gn/+ YzHut3Ec9XxK2gBXLqUVmeUE/bWcjVyAzALDazH1yGkg2TU6HCCn5sr2zohj1Gh//+JZENSAPewrzHxOfN7WDcqejaFcUaTCBG X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 925cedc6-2a87-4334-f545-08d9d93d70d1 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jan 2022 22:13:35.5082 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3UJstLnRQiKQAXXh8HkgKOjpudUyAfoI2sjN2+Kacvel9glHGKtyTb7Z5Bknx5auMcelnfNVufxbKvKGLJ2pKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4027 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10229 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 suspectscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2201160146 X-Proofpoint-GUID: skBeukMDIp8YDp6K4DR7YjBKSjHgHueI X-Proofpoint-ORIG-GUID: skBeukMDIp8YDp6K4DR7YjBKSjHgHueI 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" Xref: news.gmane.io gmane.emacs.bugs:224420 Archived-At: > > > So it uses a graphical chooser by default,=20 > > > no matter whether use-dialog-box is set or not. > > > > Exactly. That's exactly the limitation this > > enhancement request asks to remove. Let _users_ > > control whether it uses a graphical chooser > > or not - exactly what `use-dialog-box' is for. > > > > The limitation is that `use-dialog-box' currently > > is usable only with `yes-or-no' questions. >=20 > We don't provide any non-dialog way of selecting fonts because no one > has written code to do that. The dialog we show uses OS APIs, and the > implementation, beyond popping up the dialog and using the value it > returns, is not in Emacs. >=20 > So we simply cannot offer the users control of this, since we don't > have code to find the available fonts relevant to Emacs and display > them grouped by family, typeface, size, etc., in a useful way. We use > the system-provided dialogs instead. >=20 > IOW, this is not a bug. Let me try again to be clear. 1. This is an enhancement request, NOT a bug report. 2. This is a general request, to do what's suggested for at least some commands that prompt for input other than yes/no or y/n: When the system provides a dialog box for choosing the input, let the command test `use-dialog-box', and use that dialog box when that var is non-nil, but use minibuffer input otherwise. Do this when it makes sense for a given command. If it truly makes no sense for some particular command - e.g., there's no way to get the required input except by using a dialog box - then don't try to do it for that command. 3. As an _illustration_, and as a possible starting point, do this for `menu-set-font' (which could, but need not, be renamed to remove "menu"). This code does that. It uses the current code for that command only when `use-dialog-box' is non-nil. It instead uses the minibuffer with completion when the option is nil. (defun menu-set-font () "Interactively select a font and make it the default on all frames. The selected font will be the default on both the existing and future frame= s." (interactive) (if use-dialog-box (set-frame-font (if (fboundp 'x-select-font) (x-select-font) (mouse-select-font)) nil t) (call-interactively #'set-frame-font-all))) (defun set-frame-font-all (font) "Set the default font to FONT on all existing and future frames. \(This is `set-frame-font' with `t' as argument FRAMES.)" (interactive (let* ((completion-ignore-case t) (font (completing-read "Font name: " (x-list-fonts "*" nil (selected-frame)) nil nil nil nil (frame-parameter nil 'font)))) (list font))) (set-frame-font font nil t)) AFAICT, at least on MS Windows, it just works. But if you feel it doesn't work as you'd prefer, feel free to use other code. As for whether the simple code I suggested here for `set-frame-font-all' provides _exactly_ what the use of the dialog box provides (you mention grouping fonts "by family, typeface, size, etc., in a useful way"): that's not very relevant - not definitively limiting. The doc of the command can make clear what the behavior is in each case, if they differ: graphic input vs minibuffer input. In any case, the point is not this particular code. The point is not even, more generally, to fix `menu-set-font' to make it usable also with nil `use-dialog-box' (using the minibuffer in that case). The point is more general than `menu-set-font'. The point is that there's no good reason to limit the use of `use-dialog-box' to yes-no questions. But if you think there is such a reason, which precludes _any_ use, for _any_ non-yes-or-no command, to use `use-dialog-box, then please state the reason. Users should be able to make at least some commands, which today _always_ use a dialog box, respect `use-dialog-box', so that if nil they prompt and accept minibuffer input.