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#43593: 27.1; `customize-set-variable': wrong prompt for Boolean value Date: Thu, 24 Sep 2020 10:09:57 -0700 (PDT) Message-ID: <8c3c3f0f-c6ed-4883-b815-1f729879f0d3@default> 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="38613"; mail-complaints-to="usenet@ciao.gmane.io" To: 43593@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 24 19:13:13 2020 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 1kLUnx-0009x9-8P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 19:13:13 +0200 Original-Received: from localhost ([::1]:58630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLUnw-0001qb-BA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Sep 2020 13:13:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLUno-0001qU-Qy for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 13:13:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLUnm-0005o4-Sp for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 13:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLUnm-00026D-Mz for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 13:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Sep 2020 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43593 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16009675347996 (code B ref -1); Thu, 24 Sep 2020 17:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2020 17:12:14 +0000 Original-Received: from localhost ([127.0.0.1]:41525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLUn0-00024u-J0 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 13:12:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLUmx-00024l-O8 for submit@debbugs.gnu.org; Thu, 24 Sep 2020 13:12:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLUmx-0001mJ-Ii for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 13:12:11 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:38156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLUmv-0005jK-Db for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2020 13:12:10 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OH5FJC142496 for ; Thu, 24 Sep 2020 17:11:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=gyjY+5XrcYwrkvH9ddaX0akJp5QMboaQSBlzU0TNCKU=; b=PUUfK7FP+pWNLbp1EdCrcufrQK0da1G1b2v/Y2sG7Y8hr3VUV4CIauR2CuJralPQTcUy sWlKH6LckrM+1wiV6WVRVkL08mYZ+GndjFO+YCp4FwEZCKIHo/do18P/KG2IOvARR+/k eJIHPgChpWqRjAW5x61h9666URAlkiN/93cTjnklcW1NV516SKo8FgkXDSiSKI65tKsR uObv7jX9ICr5FI10FuVBu2ly9kh51sMbLdgwNmH0G7DYTA4saC3eeCRB5X7OMrnCXolt iB1w1De7+Lyl6McBRTHysCq9VAjO4AWz2W5Tf7OA1ydOg4PR7nkY715bie89eK695jtx ZQ== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 33ndnuskyq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 24 Sep 2020 17:11:59 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08OH6TNT118588 for ; Thu, 24 Sep 2020 17:09:59 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 33nujr5umx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 24 Sep 2020 17:09:58 +0000 Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08OH9w3E031287 for ; Thu, 24 Sep 2020 17:09:58 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9754 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 adultscore=0 spamscore=0 suspectscore=1 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009240126 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9754 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 phishscore=0 adultscore=0 suspectscore=1 bulkscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009240126 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/24 13:12:00 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -55 X-Spam_score: -5.6 X-Spam_bar: ----- X-Spam_report: (-5.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.199, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:188890 Archived-At: This bug exists since at least Emacs 22. emacs -Q (defcustom bar nil "@@@" :type 'boolean :group 'convenience) M-x customize-set-variable bar Set variable: bar The prompt for the Boolean value is this: [boolean] Set customized value for bar to: (y or n) Set it to WHAT? It turns out that `y' sets the value to `t' and `n' sets the value to `nil'. But there's no way of knowing that. The fault is with function `custom-prompt-variable', or more precisely, with `widget-prompt-value', and then with `widget-boolean-prompt-value'. It's the latter that calls `y-or-n-p'. The value returned by `y-or-n-p' is t or nil, which is OK. But the prompt and the expected inputs are wrong. Even if the prompt said "[boolean] Set customized value for bar to `t': (y or n)" it would be inadequate, because it suggests that if you reply `n' then the variable value remains unchanged. `y-or-n-p' is just wrong here. The comment for `widget-boolean-prompt-value' says that it toggles. But it does NOT toggle. And `customize-set-variable' should NOT just toggle the current value anyway. It should always prompt you for the new value, which may or may not be already the current value. The command needs to be consistent. Maybe the `boolean' widget should be changed to use `widge-prompt-value, not `widget-boolean-prompt-value' or something? That it inherits from the `toggle' widget is fine - that's for the Toggle button in the Customize UI. But `customize-set-variable' needs a better prompt (better behavior). In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-12 built on CIRROCUMULUS Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8 Repository branch: HEAD Windowing system distributor 'Microsoft Corp.', version 10.0.18362 System Description: Microsoft Windows 10 Pro (v10.0.1903.18362.1082)