From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Dec 2016 20:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 25152@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.148131601632296 (code B ref -1); Fri, 09 Dec 2016 20:41:03 +0000 Received: (at submit) by debbugs.gnu.org; 9 Dec 2016 20:40:16 +0000 Received: from localhost ([127.0.0.1]:36295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFRxo-0008Oi-7w for submit@debbugs.gnu.org; Fri, 09 Dec 2016 15:40:16 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFRnp-0007Wf-VX for submit@debbugs.gnu.org; Fri, 09 Dec 2016 15:29:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFPd0-00070S-Cd for submit@debbugs.gnu.org; Fri, 09 Dec 2016 13:10:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58687) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFPd0-00070I-5b for submit@debbugs.gnu.org; Fri, 09 Dec 2016 13:10:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFPcz-0007ad-3M for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 13:10:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFPcv-0006ya-Uu for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 13:10:37 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:50748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cFPcv-0006y4-LO for bug-gnu-emacs@gnu.org; Fri, 09 Dec 2016 13:10:33 -0500 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uB9IAUWw011696 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 9 Dec 2016 18:10:31 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id uB9IAUA0011920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 9 Dec 2016 18:10:30 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uB9IAUcQ010636 for ; Fri, 9 Dec 2016 18:10:30 GMT MIME-Version: 1.0 Message-ID: <037e3a81-b339-4440-ad7c-5ae9e1006050@default> Date: Fri, 9 Dec 2016 10:10:29 -0800 (PST) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.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: -4.0 (----) emacs -Q (defcustom bar `(ignore) "..." :type '(repeat (restricted-sexp :match-alternatives (functionp))) :group 'emacs) M-x customize-option bar 1. Click the INS button, to insert a new element in the list. 2. At the prompt "Lisp expression: ", hit `C-g'. Emacs erroneously inserts two new buttons INS and DEL. You can repeat this - click INS and you get two more such buttons. And if you click any of the DEL buttons then you get this error: Symbol's function definition is void: nil Something is quite wrong with the handling of `C-g', it seems. This is the case also in older releases, going back to Emacs 20, at least. In GNU Emacs 25.1.1 (x86_64-w64-mingw32) of 2016-09-17 built on LAPHROAIG Windowing system distributor 'Microsoft Corp.', version 6.1.7601 Configured using: 'configure --without-dbus --without-compress-install CFLAGS=3D-static' From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 04:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.14813438445910 (code B ref 25152); Sat, 10 Dec 2016 04:25:02 +0000 Received: (at 25152) by debbugs.gnu.org; 10 Dec 2016 04:24:04 +0000 Received: from localhost ([127.0.0.1]:36460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFZCe-0001XB-8E for submit@debbugs.gnu.org; Fri, 09 Dec 2016 23:24:04 -0500 Received: from mail-io0-f175.google.com ([209.85.223.175]:36785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFZCc-0001Wb-8A; Fri, 09 Dec 2016 23:24:03 -0500 Received: by mail-io0-f175.google.com with SMTP id a81so83446363ioe.3; Fri, 09 Dec 2016 20:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=mT8JxaWL/k18Noe3C/dCS+9HOB6GK203qlzBbXfj/DM=; b=CaTlBrfMFnirFCbmV626olRL1TNd20oyyMVJM5EgTI8m3feRA30Pd8gvK56ZoEpKIb EjyZXCs/wYB/6pwsEHWhTa0wzF0pDc2zNF0s1Pzl2vvNamXVL2x5guvNVSFLse2GwwIY eU1yOBvPefWLyknGCP5BOMU/grKYFCGpynLdGSbfsUORGy3GiSGmwmZ1do5CUqmagLCg 33Kc9SLvWr+m88ARevWwJ0bZ5ngzEcc1SF/FJYuHc71bNtD31BqTyPuQU4/gpE19xpEX SaUueCX1DI1+v1ngPVjjPxAVgqhzHEyDLqWfYYyo5OALJsSnji7SCDZEEgmDYbCz6Yef kN1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=mT8JxaWL/k18Noe3C/dCS+9HOB6GK203qlzBbXfj/DM=; b=SjYJcKzNpZUXyfCzhhByEuffPXE+GQ1Xt6Q6NLB0kbXivm0/KAcr4Y7TenMTHDy6YX iSFGnEizPc/UHSSw28a6YJh/cYPPCXGJjZ4zztXSUeA+c2s7Fys+PNkSdTeacd12eR2W daXHA1Fe0TXVZ0Ljya1RhOYAGJ1T6AHPBkHLcS86dwMSA2NEikQLCQv7LML8GLZpfOgr yrfMjE1o7qLlteG8RmN+8pgNsRnoHl9Hs3IFc9Tq4kgwU/2QHno1HkmW7GfcblVoFstE eYETwS0QKJVSDxGEhdRG8UcsHlkRL6/nAxUiSQjEc8nVXebnDFLrHpnwihjLIx775pjq ZEDg== X-Gm-Message-State: AKaTC00HC1kbQLkBJujXoYguax7nHjxKrGuopls6NqRNJDu82o/uG0boUQo//VyvUJJEFg== X-Received: by 10.36.139.197 with SMTP id g188mr9925565ite.68.1481343835374; Fri, 09 Dec 2016 20:23:55 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 9sm841481itv.0.2016.12.09.20.23.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2016 20:23:55 -0800 (PST) From: npostavs@users.sourceforge.net References: <037e3a81-b339-4440-ad7c-5ae9e1006050@default> Date: Fri, 09 Dec 2016 23:24:57 -0500 In-Reply-To: <037e3a81-b339-4440-ad7c-5ae9e1006050@default> (Drew Adams's message of "Fri, 9 Dec 2016 10:10:29 -0800 (PST)") Message-ID: <87mvg4e7hi.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) 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: 0.0 (/) merge 25152 15689 quit Drew Adams writes: > emacs -Q > > (defcustom bar > `(ignore) > "..." > :type > '(repeat (restricted-sexp :match-alternatives (functionp))) > :group 'emacs) > > M-x customize-option bar > > 1. Click the INS button, to insert a new element in the list. > 2. At the prompt "Lisp expression: ", hit `C-g'. > > Emacs erroneously inserts two new buttons INS and DEL. > You can repeat this - click INS and you get two more such buttons. > > And if you click any of the DEL buttons then you get this error: > > Symbol's function definition is void: nil > > Something is quite wrong with the handling of `C-g', it seems. > > This is the case also in older releases, going back to Emacs 20, at > least. Indeed, this seems to have already been reported a few years ago by one Drew Adams ;) From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2016 04:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: npostavs@users.sourceforge.net Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.148134476713975 (code B ref 25152); Sat, 10 Dec 2016 04:40:01 +0000 Received: (at 25152) by debbugs.gnu.org; 10 Dec 2016 04:39:27 +0000 Received: from localhost ([127.0.0.1]:36471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFZRW-0003dL-Rd for submit@debbugs.gnu.org; Fri, 09 Dec 2016 23:39:27 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:37948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFZRU-0003cz-15 for 25152@debbugs.gnu.org; Fri, 09 Dec 2016 23:39:24 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uBA4dHKC028764 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Dec 2016 04:39:17 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id uBA4dGvu022807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Dec 2016 04:39:17 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uBA4dGFC000465; Sat, 10 Dec 2016 04:39:16 GMT MIME-Version: 1.0 Message-ID: <17bb0bf3-9456-4ba9-b3de-811e672a8da1@default> Date: Fri, 9 Dec 2016 20:39:15 -0800 (PST) From: Drew Adams References: <037e3a81-b339-4440-ad7c-5ae9e1006050@default> <87mvg4e7hi.fsf@users.sourceforge.net> In-Reply-To: <87mvg4e7hi.fsf@users.sourceforge.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Spam-Score: -5.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: -5.3 (-----) > Indeed, this seems to have already been reported a few years ago by one > Drew Adams ;) ;-) Not only did he not recognize it, or recall its having been reported, but he even spent some time thinking it might be from his own code or from the complicated defcustom he started with... From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' References: <037e3a81-b339-4440-ad7c-5ae9e1006050@default> In-Reply-To: <037e3a81-b339-4440-ad7c-5ae9e1006050@default> Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 11:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Drew Adams Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.159930704625436 (code B ref 25152); Sat, 05 Sep 2020 11:58:02 +0000 Received: (at 25152) by debbugs.gnu.org; 5 Sep 2020 11:57:26 +0000 Received: from localhost ([127.0.0.1]:41664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEWow-0006cC-5Q for submit@debbugs.gnu.org; Sat, 05 Sep 2020 07:57:26 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:50755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEWou-0006by-Gk for 25152@debbugs.gnu.org; Sat, 05 Sep 2020 07:57:24 -0400 Received: by mail-wm1-f50.google.com with SMTP id e17so9111484wme.0 for <25152@debbugs.gnu.org>; Sat, 05 Sep 2020 04:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=HvKSNesVcdR6VjG55pFqw0TECbPFqRZmXt4e1+KxBh4=; b=Dsq8XT0glPL5R8WKQZtAJrv+AZVQhtzBG3tEsGuRkJUWhFzOMw+gT7APigoH6aWAOX RT0XyaUABlRhDKKx07GQVAOzdR9LT1wkXqeNUcrsZBAQ8HJTbbw8Mk8+YNqNb3rVHUYh 6S49QaLoIDZkyXIfj/o2uEC0LTGlDZpoP7UaORqWwiFFPOT9XAXLypxCkRD84GoFrnnt XtfVa+qwT9L06d7K42Pu8vuen/eO/iwbjMJt/1fbG+p7KiegDc/nQopVDczYwrKY/PrM CEe9DOLVKWRJUFx3iK4rbGmGyASjljPAOIEPhnLw2N1so6Dqqn+pg4E0T+czEmM2BnAV 47nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=HvKSNesVcdR6VjG55pFqw0TECbPFqRZmXt4e1+KxBh4=; b=VSLFZ+iBO4tN+yNm7PhPvyNSiPaQICKzFudi7V9AA2XThXBkPRMocti2AEhC7S2WGS KRbjQYyUz2rOS70XsZ1Z8k4wFQptNXmJnjjp8aUYom5nXfODd6CBLMVq80p9t4pI3dm3 EuCai7Zvt4rpIcBm1TqoresZ7Ri7SzWRq9JCs1CJkOGpiOrx7b2exW2R3BZrhtBcBW0a KD6A94lC2PfnGIPAVj2yOyTtVEt2fGhdxfez4WB5YhBUReBQcEMDldcuaqAumymuo8Cl zi7QgveQzEQCzqYVax/Ott6DT4poo5eoO6ERZBg6GxAAZ+EnRhKcdjYz5PiwdD1aQndh 6wIg== X-Gm-Message-State: AOAM533Hd40gq/UvfEL7khmwPqpJuc3RgFB+TxFXnYDfnFHjHGrZcl9a z2eVDN+35LYEbPVSFpKPqCwGkh45oYUafvXH+d8= X-Google-Smtp-Source: ABdhPJysaRtWetyyDlLd0UfoKl1tit9JAy55L+22Odu9aY11pc80zL8Phs4DZ3YdKjNy0AOgQmKFHKCMWy4J06qUfJw= X-Received: by 2002:a05:600c:230c:: with SMTP id 12mr11281561wmo.23.1599307038535; Sat, 05 Sep 2020 04:57:18 -0700 (PDT) MIME-Version: 1.0 From: Mauro Aranda Date: Sat, 5 Sep 2020 08:57:06 -0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000eb351705ae8fafdb" 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 (-) --000000000000eb351705ae8fafdb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Drew Adams writes: > emacs -Q > > (defcustom bar > `(ignore) > "..." > :type > '(repeat (restricted-sexp :match-alternatives (functionp))) > :group 'emacs) > > M-x customize-option bar > > 1. Click the INS button, to insert a new element in the list. > 2. At the prompt "Lisp expression: ", hit `C-g'. You shouldn't be prompted, because the widget library is not ready to take user input at this stage (the stage being the creation of the widget). The prompt comes from the function :value-to-external of the sexp widget, which is called in the process of creating the widget. The :value-to-external function calls read with the value of the widget, like this: (read value) It does that assuming value is a string. It does not want user input (by reading it from the minibuffer), it just wants to take the widget value and return it in the "external" format. The function :value-to-internal is the one that should print the value of the widget to a string. But it only does that if the value matches the widget, as with the function :match, which in the defcustom posted in the recipe is widget-restricted-sexp-match. So, why doesn't the value of the widget satisfy widget-restricted-sexp-match, at the widget creation stage? That's because :match-alternatives is '(functionp), and the default value of the widget is nil. Because of that, widget-restricted-sexp-match returns nil, and we store the value intact (i.e., not in the "internal" format), and we end up evaluating (read nil), resulting in the prompt and losing badly. But, the Elisp manual says: =E2=80=98:value DEFAULT=E2=80=99 Provide a default value. If =E2=80=98nil=E2=80=99 is not a valid value for the alternative, the= n it is essential to specify a valid default with =E2=80=98:value=E2=80=99. So the defcustom provided is lacking the essential :value DEFAULT thing. If we compare the behavior with the following defcustom: (defcustom bar `(ignore) "..." :type '(repeat (restricted-sexp :match-alternatives (functionp) :value ignore)) :group 'emacs) And in the customization buffer we click the INS button, then there's no prompt: creation of the widget happens with no problem. Another defcustom, that makes nil a valid value: (defcustom bar `(ignore) "..." :type '(repeat (restricted-sexp :match-alternatives (functionp null))) :group 'emacs) Again, click the INS button: no problem. To sum it up, the prompt is an unfortunate mistake, and maybe we could protect against that, but I think the real problem comes from the defcustom, which fails to provide a valid default value. --000000000000eb351705ae8fafdb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Drew Adams <dr= ew.adams@oracle.com> writes:

> emacs -Q
>
> (d= efcustom bar
> =C2=A0 `(ignore)
> =C2=A0 "..."
>= ; =C2=A0 :type
> =C2=A0 '(repeat (restricted-sexp :match-alternat= ives (functionp)))
> =C2=A0 :group 'emacs)
>
> M-x cu= stomize-option bar
>
> 1. Click the INS button, to insert a new= element in the list.
> 2. At the prompt "Lisp expression: "= ;, hit `C-g'.

You shouldn't be prompted, because the widget = library is not ready to
take user input at this stage (the stage being t= he creation of the
widget).

The prompt comes from the function :v= alue-to-external of the sexp
widget, which is called in the process of c= reating the widget.=C2=A0 The
:value-to-external function calls read wit= h the value of the widget,
like this: (read value)

It does that a= ssuming value is a string.=C2=A0 It does not want user input
(by reading= it from the minibuffer), it just wants to take the widget
value and ret= urn it in the "external" format.=C2=A0 The function
:value-to-= internal is the one that should print the value of the widget
to a strin= g.=C2=A0 But it only does that if the value matches the widget, as
with = the function :match, which in the defcustom posted in the recipe is
widg= et-restricted-sexp-match.

So, why doesn't the value of the widge= t satisfy
widget-restricted-sexp-match, at the widget creation stage?=C2= =A0 That's
because :match-alternatives is '(functionp), and the = default value of
the widget is nil.=C2=A0 Because of that, widget-restri= cted-sexp-match
returns nil, and we store the value intact (i.e., not in= the "internal"
format), and we end up evaluating (read nil), = resulting in the prompt
and losing badly.

But, the Elisp manual s= ays:
=E2=80=98:value DEFAULT=E2=80=99
=C2=A0 =C2=A0 =C2=A0Provide a d= efault value.

=C2=A0 =C2=A0 =C2=A0If =E2=80=98nil=E2=80=99 is not a = valid value for the alternative, then it is
=C2=A0 =C2=A0 =C2=A0essentia= l to specify a valid default with =E2=80=98:value=E2=80=99.

So the d= efcustom provided is lacking the essential :value DEFAULT thing.
If we c= ompare the behavior with the following defcustom:
(defcustom bar
=C2= =A0 `(ignore)
=C2=A0 "..."
=C2=A0 :type
=C2=A0 '(rep= eat (restricted-sexp :match-alternatives (functionp)
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 :value ignore))
=C2=A0 :group 'emacs)

And in the custo= mization buffer we click the INS button, then there's no
prompt: cre= ation of the widget happens with no problem.

Another defcustom, that= makes nil a valid value:
(defcustom bar
=C2=A0 `(ignore)
=C2=A0 &= quot;..."
=C2=A0 :type
=C2=A0 '(repeat (restricted-sexp :mat= ch-alternatives (functionp null)))
=C2=A0 :group 'emacs)

Agai= n, click the INS button: no problem.


To sum it up, the prompt is= an unfortunate mistake, and maybe we could
protect against that, but I = think the real problem comes from the
defcustom, which fails to provide = a valid default value.
--000000000000eb351705ae8fafdb-- From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 14:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Mauro Aranda Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.15993173325180 (code B ref 25152); Sat, 05 Sep 2020 14:49:01 +0000 Received: (at 25152) by debbugs.gnu.org; 5 Sep 2020 14:48:52 +0000 Received: from localhost ([127.0.0.1]:43789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEZUq-0001LU-CX for submit@debbugs.gnu.org; Sat, 05 Sep 2020 10:48:52 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:59024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEZUp-0001LH-Ew for 25152@debbugs.gnu.org; Sat, 05 Sep 2020 10:48:51 -0400 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 085EjxC3113587; Sat, 5 Sep 2020 14:48:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=5o2eI20+c3E/nUp9BjzJ2acsmbNrkZQWUUKE+G8ejYg=; b=Qfe/5iEY5KLPGoGKL/uxmJTsK7bNRoLZYm9jbo0aLlMH7LI8Pp93kl2pU0X+nFtNYH49 jiO1vdg21vddpIoceznO2I0LYp9nXxRp4LO8zNx7ne6az+Pnj2j5byUKhTN9l/QBYN+7 vxmPXzcD4WFZTfu4CjPHMFZbqHx8sqwKQNj0ixY5DVfpvOOaKHVDmdJQxYrC5kc7Pwox ywKjwtoivFOpusMDsblswWbcucYZ5FqWejXpLTxmYa2nM/HmzGh24WjtXbSNy7MgKJAF wp896E2beKtGr46sFkuhBNaMZou1QWR9oY29Xs+3zc3RWZQLokoZlLJ16LebdhpIqNVx Cw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 33c3amh8a5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 05 Sep 2020 14:48:45 +0000 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 085EjYNU009232; Sat, 5 Sep 2020 14:46:44 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 33c0q93vjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 05 Sep 2020 14:46:44 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 085EkhE7006424; Sat, 5 Sep 2020 14:46:43 GMT MIME-Version: 1.0 Message-ID: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> Date: Sat, 5 Sep 2020 07:46:42 -0700 (PDT) From: Drew Adams References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5044.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9734 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 mlxscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009050144 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9735 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 priorityscore=1501 clxscore=1011 bulkscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 adultscore=0 mlxscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009050142 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 (---) >> emacs -Q >> >> (defcustom bar >> =C2=A0 `(ignore) >> =C2=A0 "..." >> =C2=A0 :type >> =C2=A0 '(repeat (restricted-sexp :match-alternatives (functionp))) >> =C2=A0 :group 'emacs) >> >> M-x customize-option bar >> >> 1. Click the INS button, to insert a new element in the list. >> 2. At the prompt "Lisp expression: ", hit `C-g'. > > You shouldn't be prompted, because the widget library is not ready to > take user input at this stage (the stage being the creation of the > widget). > > The prompt comes from the function :value-to-external of the sexp > widget, which is called in the process of creating the widget.=C2=A0 The >:value-to-external function calls read with the value of the widget, > like this: (read value) > > It does that assuming value is a string.=C2=A0 It does not want user inpu= t > (by reading it from the minibuffer), it just wants to take the widget > value and return it in the "external" format.=C2=A0 The function >:value-to-internal is the one that should print the value of the widget > to a string.=C2=A0 But it only does that if the value matches the widget,= as > with the function :match, which in the defcustom posted in the recipe is > widget-restricted-sexp-match. > > So, why doesn't the value of the widget satisfy > widget-restricted-sexp-match, at the widget creation stage?=C2=A0 That's > because :match-alternatives is '(functionp), and the default value of > the widget is nil.=C2=A0 Because of that, widget-restricted-sexp-match > returns nil, and we store the value intact (i.e., not in the "internal" > format), and we end up evaluating (read nil), resulting in the prompt > and losing badly. > > But, the Elisp manual says: > =E2=80=98:value DEFAULT=E2=80=99 >=C2=A0 =C2=A0 =C2=A0Provide a default value. > >=C2=A0 =C2=A0 =C2=A0If =E2=80=98nil=E2=80=99 is not a valid value for the = alternative, then it is >=C2=A0 =C2=A0 =C2=A0essential to specify a valid default with =E2=80=98:va= lue=E2=80=99. > > So the defcustom provided is lacking the essential :value DEFAULT thing. > If we compare the behavior with the following defcustom: > (defcustom bar >=C2=A0 `(ignore) >=C2=A0 "..." >=C2=A0 :type >=C2=A0 '(repeat (restricted-sexp :match-alternatives (functionp) >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 :value ignore)) >=C2=A0 :group 'emacs) > > And in the customization buffer we click the INS button, then there's no > prompt: creation of the widget happens with no problem. > > Another defcustom, that makes nil a valid value: > (defcustom bar >=C2=A0 `(ignore) >=C2=A0 "..." >=C2=A0 :type >=C2=A0 '(repeat (restricted-sexp :match-alternatives (functionp null))) >=C2=A0 :group 'emacs)=20 > > Again, click the INS button: no problem. > > > To sum it up, the prompt is an unfortunate mistake, and maybe we could > protect against that, but I think the real problem comes from the > defcustom, which fails to provide a valid default value. Thanks for this explanation. Makes sense. Can we somehow help users by raising an error when they do this? Seems like a simple mistake to make. From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 16:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Drew Adams Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.159932482025307 (code B ref 25152); Sat, 05 Sep 2020 16:54:01 +0000 Received: (at 25152) by debbugs.gnu.org; 5 Sep 2020 16:53:40 +0000 Received: from localhost ([127.0.0.1]:43980 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEbRc-0006a7-Go for submit@debbugs.gnu.org; Sat, 05 Sep 2020 12:53:40 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:50789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEbRb-0006Zv-9h for 25152@debbugs.gnu.org; Sat, 05 Sep 2020 12:53:39 -0400 Received: by mail-wm1-f46.google.com with SMTP id e17so9503303wme.0 for <25152@debbugs.gnu.org>; Sat, 05 Sep 2020 09:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y2BS4ShWnJggwWl0OoHVS7p+t+dzS8pBgN54kVKPdPY=; b=g2FV1xw6Wifg7QVebKntBu8osryY4tS1rMkzFqX8ZfX/CxnEGmz4DedEZVL8LjzZPF qSQYOIDvGORIku2lVu20AA1LssH+6VmsMFFVJoEQCloadhHZTaUuA1EzKqebf6cPIIet x6IhwGYxUehXhwz0mZrWnq73f4ZY9w2Eo9gG7Si2HdE5PWeKLBQI3R5fafxcBXIjM8Wd qJz151IlRz8+C4P/HgSHcrdcHxZxNnr1txthoszogscnqqB+XLWjeKj2Z9SurLSlaGaB 6U+ihmGYY5XrACK7TGQN9hjcANd8Ntvbnb1doDvWxzd9mIJTHk6/9l1kbFdmJbeYMmjf Z6kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y2BS4ShWnJggwWl0OoHVS7p+t+dzS8pBgN54kVKPdPY=; b=S4h1VBEskbLWJORLwdBCtW4M/xZexNfXIXf9S5QEmo+8x9dfrK3pL9Q8PVPLFKMsoz uxB6DDYQT+3iFzfNg/q+58FTUsQmYdCymWhGYn41AiU68P+g2ZrJbZN8LutvjDfZCDyj 3Tenjz+xMi5Tr5vtuOg4r+6iFDcKOMV3ytslhx3IWykciLog9ib+RwVSuhunBNpg8e+F GET/4Mg87TEH+fJOI2NIgJg9TeGX1P5ythIxv5Z2gbJtktH48Qkk/Izz8yXN4hJTzOLM xdePgSSMr1DqGG18KtslZyVhxeIrSYFCA0QA6lNP8UnCbSopPGig7IFxkB57qFb77EKT A9aQ== X-Gm-Message-State: AOAM531ZjCH1ewrk6LBYpKUzXuHDZV05AfnGDjo28ejuQRb/monDSeeF N2KS4b10KC2hAImLKBYw2jUhRmBfBpQC+DLxxr0= X-Google-Smtp-Source: ABdhPJwknlvAVjX/pGKNfYgNb1l0ZuehT/5KHiguvL8rZZ1K1+FpBiYuQtnIV+BtWds2HgwSy0b9BI1+/MG6sYbhdco= X-Received: by 2002:a1c:a9c2:: with SMTP id s185mr13173737wme.100.1599324813436; Sat, 05 Sep 2020 09:53:33 -0700 (PDT) MIME-Version: 1.0 References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> In-Reply-To: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> From: Mauro Aranda Date: Sat, 5 Sep 2020 13:53:21 -0300 Message-ID: Content-Type: multipart/alternative; boundary="00000000000062a8f805ae93d3a3" 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 (-) --00000000000062a8f805ae93d3a3 Content-Type: text/plain; charset="UTF-8" Drew Adams writes: >> To sum it up, the prompt is an unfortunate mistake, and maybe we could >> protect against that, but I think the real problem comes from the >> defcustom, which fails to provide a valid default value. > > Thanks for this explanation. Makes sense. > > Can we somehow help users by raising an error when they > do this? Seems like a simple mistake to make. I think it makes sense, but I'm not sure where would be the right place to do it. --00000000000062a8f805ae93d3a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Drew Adams <dr= ew.adams@oracle.com> writes:

>> To sum it up, the promp= t is an unfortunate mistake, and maybe we could
>> protect against= that, but I think the real problem comes from the
>> defcustom, w= hich fails to provide a valid default value.
>
> Thanks for thi= s explanation.=C2=A0 Makes sense.
>
> Can we somehow help users= by raising an error when they
> do this?=C2=A0 Seems like a simple m= istake to make.

I think it makes sense, but I'm not sure where w= ould be the right place
to do it.
--00000000000062a8f805ae93d3a3-- From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Oct 2020 13:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Drew Adams Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.160345800712943 (code B ref 25152); Fri, 23 Oct 2020 13:01:02 +0000 Received: (at 25152) by debbugs.gnu.org; 23 Oct 2020 13:00:07 +0000 Received: from localhost ([127.0.0.1]:56285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVwfu-0003Mg-W1 for submit@debbugs.gnu.org; Fri, 23 Oct 2020 09:00:07 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:55228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVwfs-0003La-5i for 25152@debbugs.gnu.org; Fri, 23 Oct 2020 09:00:06 -0400 Received: by mail-wm1-f49.google.com with SMTP id w23so272941wmi.4 for <25152@debbugs.gnu.org>; Fri, 23 Oct 2020 06:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=128fMBF6nX673UWJejJnQcohczcf3GwYMc5rq8BoaII=; b=hdBLlGPBU/eJhu7Wh/sZH3zSwD3Yg8HxoQWq9W6BQQdGQQVUHCz4Dr3aoMq9uY784x txz5Kp0TP1eh4iY87FMDqZ1t06TdZRxAC4bcHN9MW1dK8P4xYY28ClnZRpHhM622FDes pvzQfSmRAcll26AEQDssvuWTE3C31J3sMvJa6BZ2QarL/HdOKHYwhA84ZAx1tBwm6Ecq rOS1rxFQIOnoK+sWTlC390Jy2r2/cNASVcPrrIv379NgF6kVPY8h2/IdN6z6bqXz4n+h 9bl/C43lEnKKai/KFuq9MNw0DqUY58WaSV3eqDbQgVqmw6KoRCS5R33KnUu9Z4jKeJfO Jjpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=128fMBF6nX673UWJejJnQcohczcf3GwYMc5rq8BoaII=; b=ZhZ3qq+LjV9m7LKnTbHJwdnl9FvvOn/7BKhJdKXZm33p03GNTZ+b1o9AZNehbyn41X 79388FNmGfBow6LQw8eBqMJveOt7cAPBjjYUdDZf7BCM6Td7EVmowRBoKiDRX2jQpGYv i7S1o5OeUwhmuVTkMP63lKK4xFJVpOma7I4e4ClcMOUq6SQ0tOCOO0/qI4Zc23jmQ+V6 B4QAS+iiNoAknm7ryeGMJcju+wbx30gLqKb2mjzs53/B1/LOX7dTQIitis/oS5MhvHaE O2dNace9ebZI0KDN6QGl78fmDiEQdtoyjEeGQDVxOZ+R/RfZ00M3Hkih7ugPME7ExsBI iRjQ== X-Gm-Message-State: AOAM531xX12MZXGwwDaWgUccrKV4/OrMPYrqCJhndg1lK2HIQ5p4GhhL T9VGMDGhTFnql6DXOeHDki+sVQdg2Gp38J7+Cig= X-Google-Smtp-Source: ABdhPJzMUZaVR54o1M2Fsu+zEhArHmKJ1ZqXWwGNCoYf1itt1DHB1thJAg/Vzliigqk8FbCTJwbSrTsdIu9MluGo5vA= X-Received: by 2002:a1c:dc43:: with SMTP id t64mr2265372wmg.6.1603457998285; Fri, 23 Oct 2020 05:59:58 -0700 (PDT) MIME-Version: 1.0 References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> In-Reply-To: From: Mauro Aranda Date: Fri, 23 Oct 2020 09:59:45 -0300 Message-ID: Content-Type: multipart/mixed; boundary="000000000000668eb605b2562823" 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 (-) --000000000000668eb605b2562823 Content-Type: multipart/alternative; boundary="000000000000668eb405b2562821" --000000000000668eb405b2562821 Content-Type: text/plain; charset="UTF-8" Mauro Aranda writes: > Drew Adams writes: > >>> To sum it up, the prompt is an unfortunate mistake, and maybe we could >>> protect against that, but I think the real problem comes from the >>> defcustom, which fails to provide a valid default value. >> >> Thanks for this explanation. Makes sense. >> >> Can we somehow help users by raising an error when they >> do this? Seems like a simple mistake to make. > > I think it makes sense, but I'm not sure where would be the right place > to do it. Coming back to this, perhaps a good place to warn about a bad default value is where we find it for the first time. So I attach a patch that makes the restricted-sexp widget warn (but not error out) if the internal value is not a string. So, for the defcustom in the recipe: (defcustom bar `(ignore) "..." :type '(repeat (restricted-sexp :match-alternatives (functionp))) :group 'emacs) When the user clicks the INS button, the following warning pops up: Warning (widget-bad-default-value): A widget of type restricted-sexp has a bad default value. value: nil match function: widget-restricted-sexp-match match-alternatives: (functionp) which I hope conveys good enough information to fix the mistake. I made it just a warning, because this mistake doesn't always result in a messed up buffer. But it can be changed to an error, of course. --000000000000668eb405b2562821 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Mauro Aranda <maurooaranda@gmail.com> writes:

> Drew Adams <drew.adams@oracle.com> writes:
= >
>>> To sum it up, the prompt is an unfortunate mistake, an= d maybe we could
>>> protect against that, but I think the real= problem comes from the
>>> defcustom, which fails to provide a= valid default value.
>>
>> Thanks for this explanation.= =C2=A0 Makes sense.
>>
>> Can we somehow help users by ra= ising an error when they
>> do this?=C2=A0 Seems like a simple mis= take to make.
>
> I think it makes sense, but I'm not sure = where would be the right place
> to do it.

Coming back to this= , perhaps a good place to warn about a bad default
value is where we fin= d it for the first time.=C2=A0 So I attach a patch that
makes the restri= cted-sexp widget warn (but not error out) if the
internal value is = not a string.

So, for the defcustom in the recipe:=
(defcustom bar
=C2=A0 `(ignore)
=C2=A0 "..."
=C2=A0 = :type
=C2=A0 '(repeat (restricted-sexp :match-alternatives (function= p)))
=C2=A0 :group 'emacs)

When the user clicks the INS butto= n, the following warning pops up:
Warning (widget-bad-default-value): A widget of type restricted-sexp has a bad default value.
value: nilmatch function: widget-restricted-sexp-match
match-alternatives: (func= tionp)

which I hope conveys good enough informatio= n to fix the mistake.

I made it just a warning, because this mista= ke doesn't always result in
a messed up buffer.=C2=A0 But it can be = changed to an error, of course.
--000000000000668eb405b2562821-- --000000000000668eb605b2562823 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Warn-about-a-bad-default-value-in-restricted-sexp-wi.patch" Content-Disposition: attachment; filename="0001-Warn-about-a-bad-default-value-in-restricted-sexp-wi.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kgm9g4r40 RnJvbSBkY2YxYTdhYzNmNGZlMmU3ZTZkYTgwZDBiMjE5NDc5YzhiNDU0ODU4IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXVybyBBcmFuZGEgPG1hdXJvb2FyYW5kYUBnbWFpbC5jb20+ CkRhdGU6IEZyaSwgMjMgT2N0IDIwMjAgMDk6MTc6MDQgLTAzMDAKU3ViamVjdDogW1BBVENIXSBX YXJuIGFib3V0IGEgYmFkIGRlZmF1bHQgdmFsdWUgaW4gcmVzdHJpY3RlZC1zZXhwIHdpZGdldAoK KiBsaXNwL3dpZC1lZGl0LmVsIChyZXN0cmljdGVkLXNleHAgd2lkZ2V0KTogTmV3IDp2YWx1ZS10 by1leHRlcm5hbApmdW5jdGlvbi4gIElmIHZhbHVlIGlzIG5vdCBpbiB0aGUgaW50ZXJuYWwgZm9y bWF0LCB0aGVuIHdlIG1pZ2h0IGJlCmRlYWxpbmcgd2l0aCBhIGJhZCBkZWZhdWx0IHZhbHVlIGZv ciB0aGUgd2lkZ2V0LCBzbyBkaXNwbGF5IGEgd2FybmluZwphYm91dCB0aGF0LiAgKEJ1ZyMyNTE1 MikKLS0tCiBsaXNwL3dpZC1lZGl0LmVsIHwgMjUgKysrKysrKysrKysrKysrKysrKysrKysrLQog MSBmaWxlIGNoYW5nZWQsIDI0IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1n aXQgYS9saXNwL3dpZC1lZGl0LmVsIGIvbGlzcC93aWQtZWRpdC5lbAppbmRleCAwMDljNmI0ZmFm Li40ZTJjZjc0MTZkIDEwMDY0NAotLS0gYS9saXNwL3dpZC1lZGl0LmVsCisrKyBiL2xpc3Avd2lk LWVkaXQuZWwKQEAgLTM1ODUsNyArMzU4NSwzMCBAQCAncmVzdHJpY3RlZC1zZXhwCiAgIDp2YWx1 ZS10by1pbnRlcm5hbCAobGFtYmRhICh3aWRnZXQgdmFsdWUpCiAJCSAgICAgICAoaWYgKHdpZGdl dC1hcHBseSB3aWRnZXQgOm1hdGNoIHZhbHVlKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg KHdpZGdldC1zZXhwLXZhbHVlLXRvLWludGVybmFsIHdpZGdldCB2YWx1ZSkKLQkJCSB2YWx1ZSkp KQorICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlKSkKKyAgOnZhbHVlLXRvLWV4dGVybmFs IChsYW1iZGEgKHdpZGdldCB2YWx1ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgOzsgV2UgZXhw ZWN0IFZBTFVFIHRvIGJlIGEgc3RyaW5nLCBzbyB3ZSBjYW4gY29udmVydCBpdAorICAgICAgICAg ICAgICAgICAgICAgICA7OyBpbnRvIHRoZSBleHRlcm5hbCBmb3JtYXQganVzdCBieSBgcmVhZCdp bmcgaXQuCisgICAgICAgICAgICAgICAgICAgICAgIDs7IEJ1dCBmb3IgYSByZXN0cmljdGVkLXNl eHAgd2lkZ2V0IHdpdGggYSBiYWQgZGVmYXVsdAorICAgICAgICAgICAgICAgICAgICAgICA7OyB2 YWx1ZSwgd2UgbWlnaHQgZW5kIHVwIGNhbGxpbmcgcmVhZCB3aXRoIGEgbmlsCisgICAgICAgICAg ICAgICAgICAgICAgIDs7IGFyZ3VtZW50LCByZXN1bHRpbmcgaW4gYW4gdW5kZXNpcmVkIHByb21w dCB0byB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgOzsgdXNlci4gIEEgYmFkIGRlZmF1bHQg dmFsdWUgaXMgbm90IGFsd2F5cyBhIGJpZworICAgICAgICAgICAgICAgICAgICAgICA7OyBwcm9i bGVtLCBidXQgbWlnaHQgZW5kIHVwIGluIGEgbWVzc2VkIHVwIGJ1ZmZlciwKKyAgICAgICAgICAg ICAgICAgICAgICAgOzsgc28gZGlzcGxheSBhIHdhcm5pbmcgaGVyZS4gIChCdWcjMjUxNTIpCisg ICAgICAgICAgICAgICAgICAgICAgICh1bmxlc3MgKHN0cmluZ3AgdmFsdWUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgKGRpc3BsYXktd2FybmluZworICAgICAgICAgICAgICAgICAgICAgICAg ICAnd2lkZ2V0LWJhZC1kZWZhdWx0LXZhbHVlCisgICAgICAgICAgICAgICAgICAgICAgICAgIChm b3JtYXQtbWVzc2FnZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIlxuQSB3aWRnZXQgb2Yg dHlwZSAlUyBoYXMgYSBiYWQgZGVmYXVsdCB2YWx1ZS4KK3ZhbHVlOiAlUworbWF0Y2ggZnVuY3Rp b246ICVTCittYXRjaC1hbHRlcm5hdGl2ZXM6ICVTIgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHdpZGdldC10eXBlIHdpZGdldCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVl CisgICAgICAgICAgICAgICAgICAgICAgICAgICAod2lkZ2V0LWdldCB3aWRnZXQgOm1hdGNoKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHdpZGdldC1nZXQgd2lkZ2V0IDptYXRjaC1hbHRl cm5hdGl2ZXMpKQorICAgICAgICAgICAgICAgICAgICAgICAgICA6d2FybmluZykpCisgICAgICAg ICAgICAgICAgICAgICAgIChyZWFkIHZhbHVlKSkpCiAKIChkZWZ1biB3aWRnZXQtcmVzdHJpY3Rl ZC1zZXhwLW1hdGNoICh3aWRnZXQgdmFsdWUpCiAgIChsZXQgKChhbHRlcm5hdGl2ZXMgKHdpZGdl dC1nZXQgd2lkZ2V0IDptYXRjaC1hbHRlcm5hdGl2ZXMpKQotLSAKMi4yOC4wCgo= --000000000000668eb605b2562823-- From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Oct 2020 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Mauro Aranda Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.160347176929385 (code B ref 25152); Fri, 23 Oct 2020 16:50:02 +0000 Received: (at 25152) by debbugs.gnu.org; 23 Oct 2020 16:49:29 +0000 Received: from localhost ([127.0.0.1]:58097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW0Fs-0007ds-Vt for submit@debbugs.gnu.org; Fri, 23 Oct 2020 12:49:29 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:53596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW0Fo-0007da-PU for 25152@debbugs.gnu.org; Fri, 23 Oct 2020 12:49:27 -0400 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 09NGAJ2b007233; Fri, 23 Oct 2020 16:49:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=0hHDOLHXgJFla/OHJhjj3JgsiLnqNP0/PfSm5ug5wHI=; b=pOS0O41QdBJ9NPv8UP94Hlwehja17PDgKfQiXfqGXemlEPwVm+hGzhccKmENmHLGRTq8 5TCYH8m7NVdrW74x+e0NQcwRUY0FyNidsa4rHpe9JtYNqrHtqv8z3Dviap6njaxsFeBe Wk+XGlYx9hFaoI+MhtFYUGpX7R099z8BPYHl0P7qH93njs/VH3exLHhOKdgOqM+DRTzc vuDA/29jZ1FiHxrJnFXbWIk/IJ2h2Hpi81JJ2OEVPzFulm8GwrmNnahCR7ySBjtbRYnz Nx76YlY9ZHiwP4e5IGxbQuYJpq/NSTAlt9TKNelSGLO8Mbao1SAmXTuSAXXa4TWzeo/2 cQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 34ak16vfb7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Oct 2020 16:49:18 +0000 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 09NGAEcJ118302; Fri, 23 Oct 2020 16:47:18 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 348a6rx7df-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Oct 2020 16:47:18 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09NGlGRI020198; Fri, 23 Oct 2020 16:47:17 GMT MIME-Version: 1.0 Message-ID: <3a76061b-efa8-41b3-9baf-e3297a79b847@default> Date: Fri, 23 Oct 2020 09:47:15 -0700 (PDT) From: Drew Adams References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9782 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230107 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9782 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 priorityscore=1501 clxscore=1011 malwarescore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010230107 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 (---) > Coming back to this, perhaps a good place to warn about a bad default val= ue is where we find it for the first time.=C2=A0 So I attach a patch that m= akes the restricted-sexp widget warn (but not error out) if the internal va= lue is not a string. > When the user clicks the INS button, the following warning pops up: > Warning (widget-bad-default-value):=20 > A widget of type restricted-sexp has a bad default value. > value: nil > match function: widget-restricted-sexp-match > match-alternatives: (functionp) > > which I hope conveys good enough information to fix the mistake. > > I made it just a warning, because this mistake doesn't always result in > a messed up buffer.=C2=A0 But it can be changed to an error, of course. I may have forgotten some of what this is about. If so, please ignore... If the problem is the default value then it's not up to a user to fix it, and most users won't know how to deal with such a warning (or error). They can expect warnings and errors about their own behavior, but not messages about some problem with the defcustom definition. If the problem can't be detected before a user tries to customize, then maybe, when she does, the warning should make it very clear that the _default_ value is a mismatch and advise the user to report a bug to the library author. IOW make clear that it's not about the user doing something wrong (and don't prevent the user from continuing to customize to a valid value). Make it very clear that the problem is with the maintainer of the code, and suggest that the user report the problem. And give the user some detailed info that can be copied in a report to the library maintainer. Does this make sense, or am I missing something? From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2020 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Drew Adams Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.160354283122549 (code B ref 25152); Sat, 24 Oct 2020 12:34:02 +0000 Received: (at 25152) by debbugs.gnu.org; 24 Oct 2020 12:33:51 +0000 Received: from localhost ([127.0.0.1]:32900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWIk2-0005rd-Hg for submit@debbugs.gnu.org; Sat, 24 Oct 2020 08:33:50 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:50539) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWIk0-0005rN-7B for 25152@debbugs.gnu.org; Sat, 24 Oct 2020 08:33:49 -0400 Received: by mail-wm1-f42.google.com with SMTP id 13so5050126wmf.0 for <25152@debbugs.gnu.org>; Sat, 24 Oct 2020 05:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c/vhuE8bl0cRioT/GW3duxPNtmY9aVIk1+nT+E6b/lw=; b=F35FEbDTLo2eXVj+MMVWMe5s6QhlPCFCJEXtMRY4IFeNH326+0a2FvDX2TaH3o+yL9 r1H8FNVgOtXVTBMi9rs42HXQwNKqFe9eyuwP3SxQTPyMMEcN8/XqqaiLFuQke4tkozqG YCrxRijsMMJmv8A6M2AEKYaP/nkOugst593bSTUXwJzO5d76d7PKTIBNXzna3aLsdyap 3+JaA4hgM3o7RgIkVMeLprXTO/oRLrqeisKRtywCRmsH1PkRHcuGAkUIDwsOJg9ooYeM H/qplsMKFs6gLo9MHDEVzkh/p92vyrTj9PxVYzxJ+YgFuQlkU0sxXsOedn04QJJ42AG5 HyeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c/vhuE8bl0cRioT/GW3duxPNtmY9aVIk1+nT+E6b/lw=; b=Ql/8XrAm2Pznz6JeqfHdwCBC2qqHW9QfXlzWXYGcrRcW86y2OJTosRu+mwzYjLqDME gKhw2Cy76dn/Nsq8txHLHfAlWmE6pLaFLi3x4iL8p5SYi50Ru8WSdAfa4J+CdHkzMcre 38XrtovzZ5jspgwJ2a5V55gxZ5k88+JDh7MKP+/HRHnGkfQnWa+Mb0tp2hbm1pes28wh ymzvAxRvYF8mBhnNLOZ3gKgYVHDyu/hMaRsN2Ri63MRlxEItNqK8DRfYGwSGIu3qWoQD W00kuF+A+hpzZVIJFIi+AxWMyOlslFCkIduckaZcRb+MLtknwSeojddL2PY4hbsm9zYf qz+w== X-Gm-Message-State: AOAM532CNrDxgt0cj/IuFrVPdzLYHmjJGNEO13zo43bhvYX2BXZRCZTr CMTqa24RnrnNkDrNZoquGWfMKD/LuiCkpY0QJfg= X-Google-Smtp-Source: ABdhPJytgTAK0fQFtCjZoAMG3wA6xhzTEtOBx49XP6JWFb9htPFaMiv3T5p8cH4uJZ4wlS6eglQEkutfRip4XZZAO9I= X-Received: by 2002:a1c:dc43:: with SMTP id t64mr6996001wmg.6.1603542822363; Sat, 24 Oct 2020 05:33:42 -0700 (PDT) MIME-Version: 1.0 References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> <3a76061b-efa8-41b3-9baf-e3297a79b847@default> In-Reply-To: <3a76061b-efa8-41b3-9baf-e3297a79b847@default> From: Mauro Aranda Date: Sat, 24 Oct 2020 09:33:29 -0300 Message-ID: Content-Type: multipart/alternative; boundary="0000000000004f279305b269e8c0" 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 (-) --0000000000004f279305b269e8c0 Content-Type: text/plain; charset="UTF-8" Drew Adams writes: >> Coming back to this, perhaps a good place to warn about a bad >> default value is where we find it for the first time. So I attach a >> patch that makes the restricted-sexp widget warn (but not error out) >> if the internal value is not a string. > >> When the user clicks the INS button, the following warning pops up: >> Warning (widget-bad-default-value): >> A widget of type restricted-sexp has a bad default value. >> value: nil >> match function: widget-restricted-sexp-match >> match-alternatives: (functionp) >> >> which I hope conveys good enough information to fix the mistake. >> >> I made it just a warning, because this mistake doesn't always result in >> a messed up buffer. But it can be changed to an error, of course. > > I may have forgotten some of what this is about. If so, > please ignore... > > If the problem is the default value then it's not up to > a user to fix it, and most users won't know how to deal > with such a warning (or error). They can expect warnings > and errors about their own behavior, but not messages > about some problem with the defcustom definition. I didn't mean to say it was up to the user to fix it. I said "good enough information to fix the mistake", meaning the user can report to the maintainer the warning text along with the actions that triggered it, and the maintainer should be able to take it from there. > If the problem can't be detected before a user tries to > customize, then maybe, when she does, the warning should > make it very clear that the _default_ value is a mismatch > and advise the user to report a bug to the library author. I think it is clear it is about the default value. The message says "A widget of type restricted-sexp has a bad default value." > IOW make clear that it's not about the user doing > something wrong (and don't prevent the user from > continuing to customize to a valid value). I don't see how a user could think he did something wrong with the warning text I suggested. I certainly don't think I did something wrong whenever I get Gtk-CRITICAL messages while using some software. And since it is a warning, the user can continue customizing the value. So, I think that's covered. > Make it very > clear that the problem is with the maintainer of the code, > and suggest that the user report the problem. And give > the user some detailed info that can be copied in a report > to the library maintainer. Do you think the example text I gave in the previous message lacks some information about the widget that triggered the warning? If so, what do you think is missing? --0000000000004f279305b269e8c0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Drew Adams <dr= ew.adams@oracle.com> writes:

>> Coming back to this, pe= rhaps a good place to warn about a bad
>> default value is where w= e find it for the first time.=C2=A0 So I attach a
>> patch that ma= kes the restricted-sexp widget warn (but not error out)
>> if the = internal value is not a string.
>
>> When the user clicks th= e INS button, the following warning pops up:
>> Warning (widget-ba= d-default-value):
>> A widget of type restricted-sexp has a bad d= efault value.
>> value: nil
>> match function: widget-res= tricted-sexp-match
>> match-alternatives: (functionp)
>><= br>>> which I hope conveys good enough information to fix the mistake= .
>>
>> I made it just a warning, because this mistake do= esn't always result in
>> a messed up buffer.=C2=A0 But it can= be changed to an error, of course.
>
> I may have forgotten so= me of what this is about.=C2=A0 If so,
> please ignore...
>
= > If the problem is the default value then it's not up to
> a = user to fix it, and most users won't know how to deal
> with such= a warning (or error).=C2=A0 They can expect warnings
> and errors ab= out their own behavior, but not messages
> about some problem with th= e defcustom definition.

I didn't mean to say it was up to the us= er to fix it.=C2=A0 I said "good
enough information to fix the mist= ake", meaning the user can report to
the maintainer the warning tex= t along with the actions that triggered
it, and the maintainer should be= able to take it from there.

> If the problem can't be detect= ed before a user tries to
> customize, then maybe, when she does, the= warning should
> make it very clear that the _default_ value is a mi= smatch
> and advise the user to report a bug to the library author.
I think it is clear it is about the default value.=C2=A0 The message = says
"A widget of type restricted-sexp has a bad default value.&quo= t;

> IOW make clear that it's not about the user doing
>= ; something wrong (and don't prevent the user from
> continuing t= o customize to a valid value).

I don't see how a user could thin= k he did something wrong with the
warning text I suggested.=C2=A0 I cert= ainly don't think I did something wrong
whenever I get Gtk-CRITICAL = messages while using some software.

And since it is a warning, the u= ser can continue customizing the value.
So, I think that's covered.<= br>
> Make it very
> clear that the problem is with the maintai= ner of the code,
> and suggest that the user report the problem.=C2= =A0 And give
> the user some detailed info that can be copied in a re= port
> to the library maintainer.

Do you think the example tex= t I gave in the previous message lacks some
information about the widget= that triggered the warning?=C2=A0 If so, what do
you think is missing?<= br>
--0000000000004f279305b269e8c0-- From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2020 19:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Mauro Aranda Cc: 25152@debbugs.gnu.org, Drew Adams Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.1603568488634 (code B ref 25152); Sat, 24 Oct 2020 19:42:01 +0000 Received: (at 25152) by debbugs.gnu.org; 24 Oct 2020 19:41:28 +0000 Received: from localhost ([127.0.0.1]:35148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPPs-0000A9-LT for submit@debbugs.gnu.org; Sat, 24 Oct 2020 15:41:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPPp-00009r-Gp for 25152@debbugs.gnu.org; Sat, 24 Oct 2020 15:41:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=RllAbPdjflZBvmlwpqkExFmI6XlrbS+D1wXzIdsTnGI=; b=iSlY8ehgzScUw1nzJsZ4DBTpWZ /mm4vkcjXiShpPbdlZSucl7Y0wuzEQYuJBG3cDyEY5KOQbKk+EkEwAYfUDLoi0Hbh6a5FFRxoPVuL ikjbbeLGpGZlGtUadhHQNJf5o8n3pTJy4/hwDlI+xBhy8FIZLQuZvLGFFTZ2Yh4LrjM8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWPPe-0007QQ-9D; Sat, 24 Oct 2020 21:41:18 +0200 From: Lars Ingebrigtsen References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> X-Now-Playing: Contriva's _If you had stayed..._: "deceiving trace" Date: Sat, 24 Oct 2020 21:41:13 +0200 In-Reply-To: (Mauro Aranda's message of "Fri, 23 Oct 2020 09:59:45 -0300") Message-ID: <878sbve7ja.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Mauro Aranda writes: > I made it just a warning, because this mistake doesn't always result in > a messed up buffer. But it can be changed to an error, of course. A warning sounds good to me, so I've applied your patch to Emacs 28. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 (-) Mauro Aranda writes: > I made it just a warning, because this mistake doesn't always result in > a messed up buffer. But it can be changed to an error, of course. A warning sounds good to me, so I've applied your patch to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 15:41:36 2020 Received: (at control) by debbugs.gnu.org; 24 Oct 2020 19:41:36 +0000 Received: from localhost ([127.0.0.1]:35151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPPz-0000AU-Rq for submit@debbugs.gnu.org; Sat, 24 Oct 2020 15:41:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPPy-0000AH-7t for control@debbugs.gnu.org; Sat, 24 Oct 2020 15:41:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XrF8On83RAHXf0Ji8wOarfGqHMyUUZnEbRzGVE1YHZA=; b=M6hSgwqDW/juFAhfB53mrM0Ie1 0hibQE4uDxMY7sUp6+4Z7CGmzUpXLqsaz371ghjme1xVwD3vwWTm1DypQ2HQHFJ48N925Fdja3wrT oIvP9KTG7/D+Os6jech5o8TD4C0PVY9CB+Qq6t1JVAsq/7wiIPrz5lgGJ5ii14c+Bnf0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWPPq-0007Qc-8V for control@debbugs.gnu.org; Sat, 24 Oct 2020 21:41:28 +0200 Date: Sat, 24 Oct 2020 21:41:25 +0200 Message-Id: <877drfe7iy.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #25152 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 25152 fixed close 25152 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) tags 25152 fixed close 25152 28.1 quit From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2020 20:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed confirmed To: Mauro Aranda Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.160357070420910 (code B ref 25152); Sat, 24 Oct 2020 20:19:01 +0000 Received: (at 25152) by debbugs.gnu.org; 24 Oct 2020 20:18:24 +0000 Received: from localhost ([127.0.0.1]:35251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPzb-0005RB-JC for submit@debbugs.gnu.org; Sat, 24 Oct 2020 16:18:23 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:42988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWPzZ-0005Qy-OS for 25152@debbugs.gnu.org; Sat, 24 Oct 2020 16:18:22 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09OK93TM104406; Sat, 24 Oct 2020 20:18:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=EShcXLoGvM2/80d6MUiKuLzuN1QT1McfRJK8T+p9en8=; b=OBsq0c9H6OyLgAMzqzsjoAvnihJn7RdHAqpreiuQkWYHhrZRP+qp5tFGy2KXoO9CjWy/ Y282+fehgEWnBIwpMHJWojYRyxF9GSj6uqn+A9ZF+fYZr7ZKiyeOjtMr6GsmbbG5ZWTu 4Gw0qvp/9aEIKicWCCb4zpFyD9FJ3xyPdNBbBCEdnO5BCMeJVMKqdMfeWO//c+caDhmK kj6vllUa3LvWZd5NhnqT/CCgYb5/HKiABvMV79t3DZtDL2g4ZXJvL+aXITyqKdYzNCaL ysGRFQp8IN0xxzVr6g05Vu8r26zYSJup6HG/uxyfe4Vc4FDCA4eeubrFCotcc5KwESJT mw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 34c9sah7f5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 24 Oct 2020 20:18:15 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09OKF8t3189630; Sat, 24 Oct 2020 20:16:15 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 34c9cr8n0j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 24 Oct 2020 20:16:14 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 09OKGDtw016444; Sat, 24 Oct 2020 20:16:14 GMT MIME-Version: 1.0 Message-ID: Date: Sat, 24 Oct 2020 13:16:13 -0700 (PDT) From: Drew Adams References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> <3a76061b-efa8-41b3-9baf-e3297a79b847@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9784 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 mlxlogscore=954 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010240156 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9784 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 impostorscore=0 mlxlogscore=971 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 spamscore=0 phishscore=0 clxscore=1015 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010240155 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 (---) > > If the problem is the default value then it's not up to > > a user to fix it, and most users won't know how to deal > > with such a warning (or error).=C2=A0 They can expect warnings > > and errors about their own behavior, but not messages > > about some problem with the defcustom definition. > > I didn't mean to say it was up to the user to fix it.=C2=A0 I said "good > enough information to fix the mistake", meaning the user can report to ^^^^^^^^^^^^^^^^^^^ > the maintainer the warning text along with the actions that triggered > it, and the maintainer should be able to take it from there. The user has to be able to understand that that; that is, to know that it's a maintainer problem and they should report it. I don't think your current user message invites that understanding. > > If the problem can't be detected before a user tries to > > customize, then maybe, when she does, the warning should > > make it very clear that the _default_ value is a mismatch > > and advise the user to report a bug to the library author. > > I think it is clear it is about the default value.=C2=A0 The message says > "A widget of type restricted-sexp has a bad default value." > > > IOW make clear that it's not about the user doing > > something wrong (and don't prevent the user from > > continuing to customize to a valid value). > > I don't see how a user could think he did something wrong with the > warning text I suggested.=C2=A0 I certainly don't think I did something w= rong > whenever I get Gtk-CRITICAL messages while using some software. > > And since it is a warning, the user can continue customizing the value. > So, I think that's covered. > > > Make it very > > clear that the problem is with the maintainer of the code, > > and suggest that the user report the problem.=C2=A0 And give > > the user some detailed info that can be copied in a report > > to the library maintainer. > > Do you think the example text I gave in the > previous message lacks some information about > the widget that triggered the warning?=C2=A0 If so, > what do you think is missing? This is the message you suggested, right? Warning (widget-bad-default-value):=20 A widget of type restricted-sexp has a bad default value. value: nil match function: widget-restricted-sexp-match match-alternatives: (functionp) Yes, I think that message is not so helpful for users. Most users won't know what a widget is, or a restricted-sexp, or any of the rest. They won't know what this is all about, or what they're supposed/asked to do about it. And yet it's a message aimed at users (who else will see it?). What I suggested was that the message to users should tell them: 1. The default value for the option is invalid. (Speak of option, not widget.) 2. They should report this as a bug to the maintainer. 3. They can still customize the option, to give it a valid value. If possible, we should also tell them _how_ to report the problem to the maintainer. At least as a fallback, we can tell them to use `M-x report-emacs-bug'. We can tell them to use `report-emacs-bug' if we can determine that the widget is vanilla. And we might tell them that anyway, even if we have no idea who the maintainer is. IOW, this is a message to a user who tries to interact with Customize. Either we say nothing or we tell the user there's a problem with the default value, and in the latter case we suggest that they report the problem to whoever defined the default value. What we should avoid is giving the user an impression that they shouldn't continue to try to customize the option, or that they themselves did something wrong. And we should avoid confusing them, speaking in terms of code/implementation. I may be missing something, but it seems to me that the message you're reporting is not for a user - it's a message to someone who can fix the problem, and maybe even someone who caused it. AFAICT, the message you're sending is a message for a maintainer, not for a user. If this were a byte-compiler message, it might be OK. Users know that those messages are generally about the code being compiled, which is not something they're (typically) responsible for. But a message responding to an interactive user action can't be something that talks about the underlying code (which isn't the user's fault) - UNLESS the message tells the user clearly that it's about that code AND asks them to report it to someone who might fix it. Just one opinion. From unknown Sun Aug 10 08:59:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25152: 25.1; Customize: errors for `restricted-sexp' in `repeat' Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2020 20:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed confirmed To: Lars Ingebrigtsen , Mauro Aranda Cc: 25152@debbugs.gnu.org Received: via spool by 25152-submit@debbugs.gnu.org id=B25152.160357104121477 (code B ref 25152); Sat, 24 Oct 2020 20:24:02 +0000 Received: (at 25152) by debbugs.gnu.org; 24 Oct 2020 20:24:01 +0000 Received: from localhost ([127.0.0.1]:35263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWQ53-0005aJ-4y for submit@debbugs.gnu.org; Sat, 24 Oct 2020 16:24:01 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:46596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWQ52-0005a8-6h for 25152@debbugs.gnu.org; Sat, 24 Oct 2020 16:24:00 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09OKJ3XG126171; Sat, 24 Oct 2020 20:23:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=lp8jGwh+1SnDeheEjCNnMzCVj7qL69pTSRe0q8YqOBU=; b=fFHJgAwgWxwBHZJMtdOYeqfgXWjRy6LekFSlN4rbrxo+PznYFz6990Sso+L+NxQSn784 5XpTDcNFPNMQPV8WaevBLAIZGI95Wm5HUeR4o7i+R50sWDC5wvu7QCNKPqx1cr/Vo3Hz kTbR4dLXX4A9qxRQ0trPCMA9sCQS3SOvQXaB9mYAHfxuK4O3fi3ay+96s9Oa450ZgPw8 L8AilTl4OAZR8O4zvbKLuS4LlTXnHENzjfRnlhIp4yfLjjALwtVx9UKuS1F2Dz9I8F3O S+y1DsyHMZ3FIq3z5Yoyj7IeTwikFuIwRTF4fQaAFQs8kd+lNVn8ta6ubV5IZGOHpjYC 9Q== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 34c9sah7je-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 24 Oct 2020 20:23:54 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 09OKF8tc189630; Sat, 24 Oct 2020 20:23:53 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 34c9cr8qbj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 24 Oct 2020 20:23:53 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 09OKNq3t001642; Sat, 24 Oct 2020 20:23:53 GMT MIME-Version: 1.0 Message-ID: <0dc78088-77cb-4dd4-bf41-e22a6621ba33@default> Date: Sat, 24 Oct 2020 13:23:51 -0700 (PDT) From: Drew Adams References: <45d48716-1ac9-4cb3-9c64-042dddee4e77@default> <878sbve7ja.fsf@gnus.org> In-Reply-To: <878sbve7ja.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9784 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 mlxlogscore=798 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010240156 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9784 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 impostorscore=0 mlxlogscore=818 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 spamscore=0 phishscore=0 clxscore=1015 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010240156 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 (---) > > I made it just a warning, because this mistake doesn't always result in > > a messed up buffer. But it can be changed to an error, of course. >=20 > A warning sounds good to me, so I've applied your patch to Emacs 28. FWIW, I disagree that the warning applied is a proper fix. This is about a message that we show users when they act in a certain way. The message doesn't correspond to their action, and it doesn't tell them what we'd like them to do. It doesn't really tell them anything that's useful to _them_ (end users), let alone anything that's actionable. If I was confused by the behavior enough to report this, I'm afraid users will also be confused now, with this attempt to improve the help. The problem is understood on our end now. That's good. We're close to a solution that helps users with this. It's too bad to not give them that help. The info in the new message is great - info to report to maintainers. What's missing is the message for _users_, which is to report that info to a maintainer.