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#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Date: Sat, 17 Dec 2022 20:53:43 +0000 Message-ID: References: <87a63mvvib.fsf@posteo.net> <87y1r56hbo.fsf@posteo.net> 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="40289"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "60162@debbugs.gnu.org" <60162@debbugs.gnu.org> To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 17 21:54:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p6eCG-000AGu-Ac for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Dec 2022 21:54:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6eC5-0002tR-Aq; Sat, 17 Dec 2022 15:54:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6eC3-0002tC-3A for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 15:54:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6eC2-0002j4-Li for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 15:54:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6eC1-0001b0-Vx for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 15:54:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 20:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60162-submit@debbugs.gnu.org id=B60162.16713104326125 (code B ref 60162); Sat, 17 Dec 2022 20:54:01 +0000 Original-Received: (at 60162) by debbugs.gnu.org; 17 Dec 2022 20:53:52 +0000 Original-Received: from localhost ([127.0.0.1]:57927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6eBs-0001aj-Ab for submit@debbugs.gnu.org; Sat, 17 Dec 2022 15:53:52 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:51596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6eBo-0001ab-SM for 60162@debbugs.gnu.org; Sat, 17 Dec 2022 15:53:50 -0500 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BHKpviC028309; Sat, 17 Dec 2022 20:53:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=IIyOXjo6l8CWYaZBO6djrriFiawRnkAe5dUkCNR+ELQ=; b=LVSMuKsVbr8qeZx/GbKh8eA2uD7GoXEFLj7/ivlnsq8jNHvf7QHCUmQyXJqbIuFF4mXd +Z44Zeh28vOa8soUWMhWp4tjb5HyOK4m6nIOy1Isu7nSwUVew9dtoCvFAZqC6j5iPGtG ymKVRyxVv8J/CWgnVr2I/Px0KG0tWueqOXddbdbqaLCTxBdoJ14vu9Zvk+78Q/iuh/c2 rY5kWBThQhTmQMm5ZkMOKPcHJ2/cH5tYTAgiELYq3yfqq8sr/8Yh8xIbvksymZpq+oNe 0ByRZBo4A9sZ19PXXHuw2kzOP7ou/7oOaZ5miwG84+cabXOQDJRoxoiVZEhU6tFBxsSH Zw== Original-Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mh6tm0pm6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Dec 2022 20:53:48 +0000 Original-Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2BHFhEAx012687; Sat, 17 Dec 2022 20:53:47 GMT Original-Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3mh471wsf0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Dec 2022 20:53:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gydGZPtpuiX0Ww4Mpl++n20yNfQUvXlFUK05qRuaZ3egauXnp84zRGnQC3OcdSXrC3IJ29IGAlZM2C8IkPyD/ngQkuL0vWPrtWwNqdMVyrudkh0G4c6bVQ+GFIX+Aba4ixmQadJ6rHh6GyyABmFPFa+ojibLT7i1ocQVsW6ALorNYogTlQZM18Cw7VvtHsGsPv6wQaO7tpRUTZgWrmgyxl+nFMTkI0yMVqcPbqLW6Wi6dbely4VKs5If0KpvAEXr1ndOY/8HOSwhrWm8/W8JYmE2uyjufb8MfFCSXqkMYj6H58M8T0waZakqnnr9G8J0PVySxhluqoJjV/8CnxP2SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IIyOXjo6l8CWYaZBO6djrriFiawRnkAe5dUkCNR+ELQ=; b=aFpxUyjMKWJdY3wCutG92kumJs1AfxS+HQx/x0K4sbLaLPD53NazbhPNLW+1DC/ZioZSO9Kf+bmstPIPcR8Mi3LdqhvmkoEFu7eOwfQZMOaDR5tqFhxDukdZO+S7Hn5cyIkRUaX6Lzgz+aEbrTZmwv+sELdut4A0NPRHf0SZeW9O+TmKzCaZ72NLa89YDmmxnCD5VqtpiJzHwK53MRxzuWbYnkz6Wcz/Stw11dmaw+JeYWrpoxlGlcNyxmq7srKimQ30AnyP9qoBVDuDkiH2HsatFX6kzymsiicBkZRk8OZUJXB6WW5nrJPud9COg+cqOQqtbHHd+Vco3LT8HdxcgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IIyOXjo6l8CWYaZBO6djrriFiawRnkAe5dUkCNR+ELQ=; b=u7nSI5dNPtiZ8cq1sPBv5ck3f9Srh9fPL6cnlXJlzzWAqno/mzigDghfEugSBKc3JQAzWS45+gnyUQF0Wmaas1hUETVBnwWMUxM4ccgFQXjWDfgU9w7L1HxC6jz1qAp/SVbOmUa1AqqvqVi+0S3VVd+UW7Safw8DF/MzKS7XV+0= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BL3PR10MB6115.namprd10.prod.outlook.com (2603:10b6:208:3ba::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Sat, 17 Dec 2022 20:53:43 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b%2]) with mapi id 15.20.5924.016; Sat, 17 Dec 2022 20:53:43 +0000 Thread-Topic: [External] : bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Thread-Index: AQHZEkJ1PQyuE+Z+30i0KaBee4u6i65yfaTg In-Reply-To: <87y1r56hbo.fsf@posteo.net> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|BL3PR10MB6115:EE_ x-ms-office365-filtering-correlation-id: a213df2d-d007-4507-5696-08dae070c8b1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0wB0No0qpZJJe76Th8dQhI5vZMkfVhjQDT3/MftZRIYxIVfcXjlYZrh/baehteS3ngrpVhkzaz0cM6FgbRcRxBLWeep57hZmofd8b7C+A1JV/bHkCc99jpVWEOpC0a+p7sH8fZvThx/kafncfN51peNTtEG6gFVOFyqT3DgJ8mofqrO4FExuHEntY2I1dyepsJVENnTy6yeVlRfIceMH/1P+9t1G66oH2BxVomN8fXrWm84WH2vH0g0LMRwZXHiUyV5ZtQT3ZBJYSmM/xwSvVFgRSsaTlHIJU/Msw0C2mxX9tUsHE7aHWn8uiF5D5UNIoqY4afWTlkzQW9XMNBtml6wYMWIQ8KcfmZ8zFzjPaYTfOF0pNQfMQ+j0mBfdjZwxh1GGJCY03E8rqyz/VJIM4xvv429Vmlgs+wB3WGh0j6Nz+U03vRFxDOUHkmgGDeixuv+ykkAojCyhEAtc7I6oEmPKRHdVF48S2TutQ13WwYa6g8od2Gw3vucCjt8v3fkh7lZpsBLZ0NBsWLan2kYQwYngYTE2i/syrYBSO1JPSi35vUF92j3pdksfM56FYjNy59xv651K7ifcpw+AWEzXrckkfuqN7FwyG/OlZRYrd+v1DHcVodrtZYObfsK5UxtNcpc0hbslQWdiypIE6oloIbdwUZ2nk6043WCraoNS7q0DZMV3v0DxFgkDz43GNkp8WE7nG5Qo0tWaythVgo5v/g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(366004)(136003)(346002)(376002)(396003)(451199015)(38100700002)(55016003)(2906002)(122000001)(44832011)(38070700005)(26005)(7696005)(478600001)(8676002)(76116006)(52536014)(71200400001)(66476007)(66446008)(64756008)(66556008)(4326008)(5660300002)(186003)(66946007)(6506007)(8936002)(41300700001)(86362001)(9686003)(316002)(83380400001)(33656002)(6916009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: AGiEwRzyv5JxJi9Mm7tZMSe1Mzk+/skd38ET4ewzhgvuCZlRPPK0oSM0HDLMPOyUKal42PofcFvswPZL6qsRkhjizohRm9TE7VfZEXBDzOsahG1CJpqxuk2XMmoE8o2phRW61Kulf0IeezJ/DdO7Hp4ygAO8oco+wMGT1hwg6cckcUasmoc+ic6bXkh75Sf8m3xd+G/eWKI9v6g7OdZaEQ+LXr2jPDJZCUjf6PaooNNLAF+eAZLcb+HKuPWAy+vw94z5d372oGClNfHBdfmjog9c8/284T5QQbdboHOGNgcgiJlPLl3f+HNXCfOxPgsFqOfm07x2VGwnIBt3hQIhHf43mdWevJR/hRi+kUjvkooXkTKhPTuYMQ3OrrqNIlvGIdWmhZw0o46Iu63YZ7355HG6QsDWgqeuCl5au8Rbr5xRxvRbe9z6fdkJQW9JV8d6Cmfqa6i5jeAbOiH6Z9+UQR5KjI82DTa3rvjexGtzSOxSFJEfIkGZgvn1j/Qb6Oiw2rBD9Spu+nOE3vvjd+uS71GITS0lymb7f7mN0gfRDXNeVzxF5+rM3MCoB7w2UiazUifR+cLhvIXA2rbD32HBMceiU0lKyybT0A9ooTQTySwxHYJbXAE8UZSq2Xa8lCPmKA0WbfsS4k/Matv+of+9s/8oX8LLpXQkhlguaxY52trm2ja3pQchnFj2v134J0s7ZHcVjeRpUQKAv4/YhGsLfkAm5GqqAzQGjCiQ1ps3UVObh+skFL8qdme8r4 ZeYBvzR/eXUTxIl7+DoEgrQwh/a4Es6C9LaB2Vos8FFaUPE1Rqmk8S/PdjgAbBpXND1vAlzePytWkP4cApsJ7jFQc+JZ2faLb3 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a213df2d-d007-4507-5696-08dae070c8b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2022 20:53:43.4214 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YqHpLIXhc9nWikTuqcQtoKgwm/v+f5oDlpy2+nMHdzHrobagnq5KADhFpk9jdBQRIvAxujYFO7LYbkVDCXXTaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR10MB6115 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-17_09,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 suspectscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212170195 X-Proofpoint-GUID: 0aPM56YwhI3GhUuOZOz8nkVv6eQmhNy2 X-Proofpoint-ORIG-GUID: 0aPM56YwhI3GhUuOZOz8nkVv6eQmhNy2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251312 Archived-At: > `customize-set-variable' isn't used at all, > to prevent modifying the user theme. =20 1. Why? Why should the two differ wrt whether theme `user' gets modified? Why does updating that theme make sense in the one case but not in the other? 2. And now that this is brought to my attention, I really wonder why `customize-set-variable' pushes the new setting to the `user' theme. AFAIK, there's nothing at all that requires, or that should assume, that that function is called by the current user, or that even if it is, that that user wants theme `user' updated that way. This is apparently the case at least since Emacs 22. Emacs 20 had no custom themes, and I don't have the source for Emacs 21. But a guess is that whoever (Chong Yidong?) added custom themes to Emacs decided to add this to `customize-set-variable'. 3. Why is modifying theme `user' a good idea for any function that changes an option value? Especially, why should that be hardcoded (i.e., not an optional parameter)? I see that we modify themes when a _face_ is changed with `face-spec-set' (via `face-spec-recalc'). But I don't see that we do that if you instead use `set-face-attribute' or similar. What criteria decide whether to modify themes when a face gets modified? 5. Does the Emacs 29 manual call out this difference between `setopt' and `customize-set-variable'? I see it only in your email, not in the doc strings or the code comments (in what you included in your mail). 6. Coming back to your fix: why is warning instead of raising an error TRT? You say it's to be able to continue loading an init file. Do we do that with other attempts to set a user option/face to a bad value when loading code? I think not. For `customize-set-variable', `customize-set-value', and `setq'/`set' we issue no warning and raise no error. Runtime "warnings" are generally a _bad_ idea, IMO. Even "warnings" during code loading are a bad idea. My suggestion is to either raise an error or do what `customize-set-variable' and the rest do, which is set the value and ignore whether it might be bad - don't even test it. ___ `setopt' was added for Emacs 29, which isn't out yet. Is the behavior appropriate? What's the rationale, besides not having to quote and allowing for multiple settings? Other than quoting, why should it behave differently from `customize-set-variable'?