From unknown Fri Jun 20 07:20:00 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73084 <73084@debbugs.gnu.org> To: bug#73084 <73084@debbugs.gnu.org> Subject: Status: [PATCH] Include the variable name in the `setopt` warning Reply-To: bug#73084 <73084@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:20:00 +0000 retitle 73084 [PATCH] Include the variable name in the `setopt` warning reassign 73084 emacs submitter 73084 Okamsn severity 73084 normal tag 73084 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 06 20:23:23 2024 Received: (at submit) by debbugs.gnu.org; 7 Sep 2024 00:23:23 +0000 Received: from localhost ([127.0.0.1]:54418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smjEY-0002Lw-WD for submit@debbugs.gnu.org; Fri, 06 Sep 2024 20:23:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:34860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smjEX-0002Ln-7r for submit@debbugs.gnu.org; Fri, 06 Sep 2024 20:23:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smjEQ-0002zI-GT for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2024 20:23:18 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smjEM-0004VG-7K for bug-gnu-emacs@gnu.org; Fri, 06 Sep 2024 20:23:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1725668584; x=1725927784; bh=Hqw81ckUdzqKNSMuek/fkDXSTy4sEZTRzn1mUK2khLw=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=b094jiwRz9mpl1RVYWd2g5S094qsTZsfS8Zr7QdH0YdDxaR9SE+aBXGLj7Yb0keRx QhOGgq8bUBTvyocibexEMHs45zhQ85YfOijIAx4wFK1Lqv1/3c90ii2sSraDZTqWhG 6NVxRhNg9XKP338LBPtf6YGB8HL7JdIyzMh/R7t5jCOq7XB/9ZLl+4BiiAPPRLtbJ4 MSKPUNdEwMAXzVfXgBA3HQ34xoiATPH2XQSHm+JqWMdZU0kCAA0pobiF48wdoH0pac zTc7yYScSt9jrclORs+hhXHZamBwEfulTh6C6OqAM+TskYGOHaTAp9te+iHoSXN61Z biu7+CXN65AGA== Date: Sat, 07 Sep 2024 00:23:00 +0000 To: bug-gnu-emacs@gnu.org From: Okamsn Subject: [PATCH] Include the variable name in the `setopt` warning Message-ID: <9c212734-cb61-45dc-96f0-3256ab116627@protonmail.com> Feedback-ID: 25935600:user:proton X-Pm-Message-ID: 4c6197c5f8d9d1125b2c5a1a253d0c1dc4763fcd MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_Og65lFwX1MQyaD6uSfySVQ9IKFFpVSywuK1QFF1x9w" Received-SPF: pass client-ip=185.70.43.16; envelope-from=okamsn@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --b1_Og65lFwX1MQyaD6uSfySVQ9IKFFpVSywuK1QFF1x9w Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, The attached patch adds the variable name to the `setopt` warning. I write my Emacs config in an Org file, from which I make the Emacs Lisp=20 file. Currently, if `setopt` detects that the value I wish to make a=20 variable hold does not conform to the variable's Custom.el type, then it=20 reports the type and the problematic value, but not the variable itself,=20 when I open Emacs. This adds extra steps to editing the code in the Org=20 file to fix the warning, especially when the value is created=20 programmatically. It would be faster to search for the variable name=20 directly in the Org file and to then re-tangle the Org file. Thank you. --b1_Og65lFwX1MQyaD6uSfySVQ9IKFFpVSywuK1QFF1x9w Content-Type: text/x-patch; charset=UTF-8; name=0001-Include-the-variable-name-in-the-warning-in-setopt-s.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-Include-the-variable-name-in-the-warning-in-setopt-s.patch RnJvbSA3Y2M3MTM0YjFiNzUxNDI4YjdjMTRhMGI1NGY1NTE5M2E1OTM2M2IxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBFYXJsIEh5YXR0IDxva2Ftc25AcHJvdG9ubWFpbC5jb20+CkRh dGU6IEZyaSwgNiBTZXAgMjAyNCAyMDowNDoyNCAtMDQwMApTdWJqZWN0OiBbUEFUQ0hdIEluY2x1 ZGUgdGhlIHZhcmlhYmxlIG5hbWUgaW4gdGhlIHdhcm5pbmcgaW4gYHNldG9wdC0tc2V0Jy4KCklu Y2x1ZGluZyB0aGUgdmFyaWFibGUgbmFtZSBtYWtlcyBpdCBlYXNpZXIgdG8gZmluZCB0aGUgbG9j YXRpb24gb2YgdGhlCm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9w-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 08:44:14 2024 Received: (at 73084) by debbugs.gnu.org; 7 Sep 2024 12:44:14 +0000 Received: from localhost ([127.0.0.1]:55106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smunV-0001Y8-QS for submit@debbugs.gnu.org; Sat, 07 Sep 2024 08:44:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1smunS-0001Xr-5O for 73084@debbugs.gnu.org; Sat, 07 Sep 2024 08:44:12 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1D1A3240101 for <73084@debbugs.gnu.org>; Sat, 7 Sep 2024 14:36:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1725712568; bh=S2O5Rpi47CF2ZAz/QOy1rnLs+KGkcQTzysEYOjHguuw=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=rVGoY0L3uysH6LXPsB0AhaT+f633rMZLefSS1IEP9fcxsNkzWWiZcj4I29cSD8HyR nfjwkgGtBhXgpaRfY3pvuBb+QXaHz9noicjol+aEhZKzeUo1GWbEmPFaRo28fINU2Q w4yt9auFYDmMYweJ8qPOz8HuiL4qEqdniya+RsLln74fuHRzwArRhbb4+qNqWWhOZ7 jV1rbjPlGiZdfgZkfeZM4f10zq+oChWRAE87VvYbJD4C0kTU4o8NcarNbmEgKm0H9N lY+pBqLAqA7NLXTtzxcbUAXwrmkdboGuE8Nww1kKD3U4wU5dmgZXkXUBnizvmMAmZk nWQnA640TC1YA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4X1CJ73563z9rxF; Sat, 7 Sep 2024 14:36:07 +0200 (CEST) From: Philip Kaludercic To: Okamsn Subject: Re: bug#73084: [PATCH] Include the variable name in the `setopt` warning In-Reply-To: <9c212734-cb61-45dc-96f0-3256ab116627@protonmail.com> (okamsn@protonmail.com's message of "Sat, 07 Sep 2024 00:23:00 +0000") References: <9c212734-cb61-45dc-96f0-3256ab116627@protonmail.com> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Sat, 07 Sep 2024 12:36:05 +0000 Message-ID: <87y143y72i.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73084 Cc: 73084@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Okamsn writes: > Hello, > > The attached patch adds the variable name to the `setopt` warning. > > I write my Emacs config in an Org file, from which I make the Emacs Lisp > file. Currently, if `setopt` detects that the value I wish to make a > variable hold does not conform to the variable's Custom.el type, then it > reports the type and the problematic value, but not the variable itself, > when I open Emacs. This adds extra steps to editing the code in the Org > file to fix the warning, especially when the value is created > programmatically. It would be faster to search for the variable name > directly in the Org file and to then re-tangle the Org file. I think this is a good idea! What might also be useful would be to generate line warnings, as the backtrace should have the necessary information. > Thank you. > > From 7cc7134b1b751428b7c14a0b54f55193a59363b1 Mon Sep 17 00:00:00 2001 > From: Earl Hyatt > Date: Fri, 6 Sep 2024 20:04:24 -0400 > Subject: [PATCH] Include the variable name in the warning in `setopt--set'. > > Including the variable name makes it easier to find the location of the > error. > > * lisp/cus-edit.el (setopt--set): Include the variable name in the > warning. > --- > lisp/cus-edit.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el > index 9f5ac47490c..035499deb71 100644 > --- a/lisp/cus-edit.el > +++ b/lisp/cus-edit.el > @@ -1072,7 +1072,7 @@ setopt--set > ;; Check that the type is correct. > (when-let ((type (get variable 'custom-type))) > (unless (widget-apply (widget-convert type) :match value) > - (warn "Value `%S' does not match type %s" value type))) > + (warn "`%s': Value `%S' does not match type %s" variable value type))) > (put variable 'custom-check-value (list value)) > (funcall (or (get variable 'custom-set) #'set-default) variable value)) -- Philip Kaludercic on siskin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 08 02:22:11 2024 Received: (at 73084-done) by debbugs.gnu.org; 8 Sep 2024 06:22:11 +0000 Received: from localhost ([127.0.0.1]:57882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snBJK-00081j-VS for submit@debbugs.gnu.org; Sun, 08 Sep 2024 02:22:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1snBJJ-00081S-CF for 73084-done@debbugs.gnu.org; Sun, 08 Sep 2024 02:22:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snBJB-0003Ga-St; Sun, 08 Sep 2024 02:22:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hwbBabQh2uiTrCFxcsuVp/iytE8Jb4M/pV7jS9yJ76w=; b=NGxh6A7ILMpw 2LVB324jcjI19KfrwPPxIllcq6Ky7syHoKyJLdTv9TojyJuEGw3yPULUf7fW691G4U7w/KdGjv6Wq sWUrqa7z8k904gnnAv2N9z04tZJpI4Sy7dMm9ObOQqjJ96VsXAHHtOrQ7oFS8uqlfidso7bJlbZHM voBtcAWr+rzOqDn/CRFCt+DZzQ54leq4EhHWa9ztDVn+/hLY1+qnp2kWCg1eCsLqajDeUrA9xVUPG pQoCdc2ooHmsYaKX/0TxrYHCFL8WJPvh9i0c6ZDM6LWjeQLfVsjrNJe4It4/pO6KFZ8zySB+aXXOV di/HLWZQDSieKPFDp/UsIg==; Date: Sun, 08 Sep 2024 09:21:59 +0300 Message-Id: <86plpewtq0.fsf@gnu.org> From: Eli Zaretskii To: Okamsn In-Reply-To: <9c212734-cb61-45dc-96f0-3256ab116627@protonmail.com> (bug-gnu-emacs@gnu.org) Subject: Re: bug#73084: [PATCH] Include the variable name in the `setopt` warning References: <9c212734-cb61-45dc-96f0-3256ab116627@protonmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 73084-done Cc: 73084-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 07 Sep 2024 00:23:00 +0000 > From: Okamsn via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > The attached patch adds the variable name to the `setopt` warning. > > I write my Emacs config in an Org file, from which I make the Emacs Lisp > file. Currently, if `setopt` detects that the value I wish to make a > variable hold does not conform to the variable's Custom.el type, then it > reports the type and the problematic value, but not the variable itself, > when I open Emacs. This adds extra steps to editing the code in the Org > file to fix the warning, especially when the value is created > programmatically. It would be faster to search for the variable name > directly in the Org file and to then re-tangle the Org file. Thanks, I made the warning say Value `foo' for variable `bar' does not match its type "type" I installed this on the master branch, and I'm therefore closing this bug. From unknown Fri Jun 20 07:20:00 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 06 Oct 2024 11:24:13 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator