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.help Subject: RE: [External] : Configuration files vs customization Date: Tue, 24 Jan 2023 20:16:01 +0000 Message-ID: References: <25548.5130.933634.159947@woitok.gmail.com> <25552.5628.453256.171331@woitok.gmail.com> 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="28931"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: Dr Rainer Woitok Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 24 21:16:58 2023 Return-path: Envelope-to: geh-help-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 1pKPiz-0007LI-Cq for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 24 Jan 2023 21:16:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKPiV-0003sj-28; Tue, 24 Jan 2023 15:16:27 -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 1pKPiL-0003q5-EY for help-gnu-emacs@gnu.org; Tue, 24 Jan 2023 15:16:18 -0500 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKPiE-0005N5-DT for help-gnu-emacs@gnu.org; Tue, 24 Jan 2023 15:16:12 -0500 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30OGOPGN027673; Tue, 24 Jan 2023 20:16:05 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=01eSyxed27L9FgkJlKnzjhKV2zmKTSTN8mhG1e/nnAU=; b=26YGc7i0w7dctuCVlDHg0TfUAOo9/5sFj9EYs9cmb1JXu8TlsG+IJIede/6nyVGEXLCK Ls4qu48ZQzLjssLSLZvSHL6z/1MF/WX38J/YAG8l+BW+5fCwpzhUgUdvdZczae/qraLL Nq7Zfiwa2gMW+B3MVpHIhMn8X+/eGI5u3dqqIDtSnJnxO9LXkxtkW+O7flWjG3gVeJFu u9WJJPBtwoTsubliej6AXr0lui7uV9auN584Q6xewAn9uYwDcibkq/36OWgbL8/wfdYK sbvhMCMEgGiOW8eWVD9Sxum3y/K8YB8k6v5hJK5VH1AASs8nnuOBsH9bgo2PX18P4LCo uw== Original-Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n87xa6b5e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jan 2023 20:16:04 +0000 Original-Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30OImZJB021167; Tue, 24 Jan 2023 20:16:03 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2173.outbound.protection.outlook.com [104.47.59.173]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3n86gc94wa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Jan 2023 20:16:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RXAai8oQ40bsJhp0la5wcvC1WbyqW6d1YGQxI6r7QJgIHtcyeNS3w9HmGUxJATVmkoIhPWuQKLeZ/HO/i7LDJHchi559GmfJdflzSSTIZJlSLxBo2zfAfMVWgT1KdCLARWqvSfOgFAS5JuLqHXxLWwsZdiBt6m2zynU4HIWGZtzRXjCm8JhbXVO0Ru67alEZFiZ+KvDEg62ThxqJ7agQ/B8Ly0FYXuUjZHNcMBcECkARUq+di+gNQSNYidakVLSocWXDIcdX/kD+hCRUv3kPAysnjUYDY9WWLewUMG+v8/nuUShyPnu2OBEgsAPKaQuk+GzcNWEygYrb2J+l9abH6A== 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=01eSyxed27L9FgkJlKnzjhKV2zmKTSTN8mhG1e/nnAU=; b=GjnKdgy2z71+WYPybmlcaf4JT1P2pwkKgU1dY26BGKDSKRvlIpTFRPDmNPuLuAw//wQTr35BBxU12wH1ZIdG06tm5UQjH3Ys1TJ/8CSfj6AyeJ3RoU8cv7PEOFDgsbRgfceu8EWKfQ1DWUhmeeIkD1MIUw6+JG33143QEW59y9Q8fRQdi/bSbGlFuS1rnvz/R5va+kO7FUzs7WaSgcmNgLo6jhc3hYMd9jQMe9S1reNChrCQlzW1z5aNpQkZrUPU0nKXQgfPBptaD+umCutWVmesqzHtKp90vEYhieMZ/EGSFELjBaM9O6/3yhpckYO9rI2XVUc5cPsVQUpQGWOlhg== 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=01eSyxed27L9FgkJlKnzjhKV2zmKTSTN8mhG1e/nnAU=; b=G7Wji3J+yzDd8srDa7/SbKPJwlmTeAKBhG4HGTO8T0iT9ENPsspvETmz3NGpb6AkMhd81tEyoe81pdV/fDPP4hiKaS4Tog2ZHzKhBaAwsoF15kIoIplFl3l6Wkkr6A7bVYE0Z3MVADnv3aVUW98lMGZpdN1VCiXEtI8v9c1eslM= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CY5PR10MB6119.namprd10.prod.outlook.com (2603:10b6:930:35::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.17; Tue, 24 Jan 2023 20:16:01 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3c:e53d:5276:ef29]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::7c3c:e53d:5276:ef29%7]) with mapi id 15.20.6043.017; Tue, 24 Jan 2023 20:16:01 +0000 Thread-Topic: [External] : Configuration files vs customization Thread-Index: AQHZMBm81jin2SU4hkawLg3G5vqYyq6t+/KA In-Reply-To: <25552.5628.453256.171331@woitok.gmail.com> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|CY5PR10MB6119:EE_ x-ms-office365-filtering-correlation-id: 2b8a6345-83a7-43a5-3953-08dafe47d00f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +QBwgIUedfr0URTmFLFKG/wI2OcFZY2AJIxzmygl+tXJX0u+PyslKPOrbFC7/hidr5gkxRxNwlGElNladlE1NoN2PdKOa75Idv3JTVaUe5U0lrqeq5gWARpc8u+8iIVzMGgyb7P+ft7jAAbwvd3MOyrRwTJsKbvxCJK0nBYksZ09i9Sq9mfw/ch9Kpz5MuzY0zpgB5WMzVJzcSiPf0BP2v5Xwn0/9LgFppq0p/HHxuZMgjmVL8j1fgmpTpEIgHV3GGHBil7Icn7mGX4rH5Z+4b0lw9oo+ARHJrx1Fw5jrwpFxpMl7pRfgFvkNRcIo1qMIZOMJ3mHwK6mv/GZjvC6lZJ6hZlx44tsqA632WQjPNRe0AQezhpfqGJPRxZvwebL04wpqP9DmtfMMxeZzvSpZ8pdl4pgJncQ63v18a3/Vd2Xfrqz/rN6XrhHOJChi5F+4uckpeGOueIxULda3BNkc5k1wd4+ySQRTIO+u9MZaQVbhpURh22p+DMANLMJR+hHXLKDgZp0azgZdZFqypvGj1G0RpxVKi4SDmLxSUzDJoVbcXcxq7LdxTXp/iaGWOCBx6bMtFerR8xo7eREkTZV1dj5nZDCh+14esoT1Jrd4hzqyPubNP1hz4iw5I9RfPKVtEqy0SvqvtxZDOvhsNPhyqwFRxSVimiGyx7c6VG7QVNfAkk4pK2PLz0QoQgEyfTkgWrxlYXC23mgBeUgY9jFuw== 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:(13230025)(376002)(136003)(366004)(346002)(39860400002)(396003)(451199018)(66899018)(86362001)(478600001)(33656002)(316002)(71200400001)(55016003)(7696005)(38070700005)(122000001)(38100700002)(83380400001)(9686003)(66574015)(6506007)(26005)(186003)(5660300002)(2906002)(44832011)(66946007)(52536014)(4326008)(66556008)(64756008)(66476007)(66446008)(6916009)(41300700001)(8676002)(8936002)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?1ZZTIuQBaMvJMb71G+hhPLM7n2H2gBcAb/yxeTj5nKwSlLfXnl777Uv4+7gQ?= =?us-ascii?Q?LuKNZBCOUClXqkQ6QzJ9hPzwe6bXzNGLvve2BD4h3CNyoeZEYm8eMPDbZIX1?= =?us-ascii?Q?zhthEUJeZST0JHkMB0avZGH37igDqUJB+W/rHjWe+FGffxO6n7vrnJa0lgnv?= =?us-ascii?Q?pKhZC0KzyZegdgHK5Ch+Y3Mmi1wc+aQY9H0ErQQiFB1R66/5v8VBUswpwkkS?= =?us-ascii?Q?oDgG3i1O9eZOINne4s3swaPrgEkuHQTPg07wrs8hbfUlT2xvO6pLLvhbqUy4?= =?us-ascii?Q?ZRV59Kg9PjRkRa1H3C3pJ237tqmgw7sO75/WIWv1u+QSCfYLwI+MptuQWzBZ?= =?us-ascii?Q?n3QZtexBtapX4riuuoX8tWaR4sICS3ixqlNPiPIIghP6KR+A1gJb7kbKgQMf?= =?us-ascii?Q?NKD5irXYSr5sSfpZuV+kMZ62clLLXhFsSkt3XYpUO8rudH7KxSpf5rG2AjMa?= =?us-ascii?Q?rxpNUHX2j3wlnj4eZCcsiB+uF+B6Dw4jzq622I2JLGIFwaJrY3s+kmNIM6vs?= =?us-ascii?Q?T/d96rh8dst3SI29Uo8AERFiX1voEWnZRbcFzWQnwAY2cxPfTUHNVcxDJuxq?= =?us-ascii?Q?J1qvxmxo7NwLDDExfXbN59LT3n2F8kDQam9zjfBpI4Y2HVqB3DY2D6Rlq16a?= =?us-ascii?Q?iM X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Q/r/9CgFbtxKcMTIyLmxu+bAyTCvIOOcj+5vIIw0rZzoXrrawI1pWsY67UFLdXn+rdUUpmc6py6G7mpHwivvrCPS6rsYnGFwiighTNtYX+z74YaRHNee72pdlkCKV690kQy5CEK+9lCOxT1V9+jbdRZIeSH08LmXg7rxVFFhYxBSoykMvfkxW6NNu1T+r0wf6pWQZFUbXREGqWTSNXyx53RQTtzilYTt7Qfc7oMdyJDsfGn7soOmCbjGH9jb2gPNLxIrrepYbGKdP1UYYJ9ZtiGBlbXkoe7NkNgB/qObeypaBbOSf2J18qhEPkhS8+fypiPFungdJyGXpVPQSav5kH0sJBMU/SY3KD3pcnf31MMSZvoIMijcCSKe8JprvN/vr/cZZRK9kGPLqU11A6hdH+7YlWDfTGJrzrn7GYekiEjA1UqI9KhPyU5eLBUxZaIqKjz2q9VbRFYJEm2cpLjSXupARCj3/ORqjlB0NDX4Z2GyERGvAK5ialZLbJFBpOHwnVdeAJQwXLYTfypcDejiX9pXit7By6IhKJttSBrDaAoslyd5ouzAEBWOzQdIooVce8A34+0LEXUAIX3pred9xrS3WYd+h81fjUyXfn1EZzLRv409gcwOKWORlRsHh76KjtmVUs129KXr9rvERx8jEUlhCDvVb8Fmb5oLNkMF8xDOjqXYnYvFu2FYMg8zFsTKMtIhsI66B/1gFmJSMqyAlPGnWmAjn48EiPLPjmaBEwSJeI ZO3vMLs/Hxmg8kVbUowqVShDi1oMniMLDjpHef0g== 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: 2b8a6345-83a7-43a5-3953-08dafe47d00f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2023 20:16:01.2512 (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: a7+IMu7Bo3k3eRkw/qF3W7MFzW3FNcyOM79QcNH7Z8RSIZUT7vROcKb+DNVETjSiCf4cXwQkuSy8a7qzXac5Vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6119 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-24_14,2023-01-24_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 spamscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301240186 X-Proofpoint-GUID: 6Ze72RYJqFdabjz65bWsH1yujZOTrCHA X-Proofpoint-ORIG-GUID: 6Ze72RYJqFdabjz65bWsH1yujZOTrCHA Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142525 Archived-At: > > More precisely, they _might not_ work right. And "work > > right" is vague. What that really tries to say, IMO, > > is that unless you know what you're doing, it's a good > > idea not to use multiple `custom-set-variables' sexps > > in the same file. >=20 > Am I correct in assuming that this has to do with "customize" just re- > placing the first call to "custom-set-variables" with the new settings > when saving? To my understanding, yes. > > The point about using Customize (the UI), or the custom > > and customize functions - _instead of setq_ - is that > > setq doesn't know about any :init or :set additional > > processing that's required/intended/expected when you > > initialize or change the value of a user option. >=20 > That's what I meant when I said that "you may customize this variable" > in the output of "C-h v VAR" at least in some cases means "you MUST cus- > tomize this variable". Maybe you mean to say that it means that IF you want to change the value THEN you must use Customize. That's closer, yes. But it's not a must. Not a must that you use the Customize UI, since everything it offers (other than interactive editing) is available also with custom* functions. And not a must because,\ in fact there are many user options for which there's no associated :set or :init etc. function, and for those you can reliably change the value with setq. However, changing the value doesn't save the value persistently. If the setq is in a file that you always load then yes, the effect is persistent. > I think it would help a lot of people (and not > only Emacs novice users), if function > "describe-variable" could inspect the variable in > question a bit more closely and then chose the > appropriate wording. `M-x report-emacs-bug', to file an enhancement request. > And while we are at it: the Gnus documentation, > both locally in the Info pages and on the internet at `M-x report-emacs-bug' But changes to the manual serve for both the manual in Info and the manual online in HTML. The change only needs to be made once. (Of course, it's only for the latest released version of Emacs.) > only talks about using "setq" for defining configuration variables and > never ever about customizing them, thus potentially discouraging people > from using Gnus at all (actually, after I failed to get my old Vm runn- > ing, I decided to abandon this unmaintained package and use Gnus in- > stead. But it was only after I failed configuring even Gnus and getting > it running, that I had the -- successful -- idea of customizing all and > sundry, which then also succeeded for Vm, phew :-) >=20 > So, whoever is in charge of the documentation section of an Elisp pack- > age should check and where necessary update its configuration section. > Apparently, some packages' documentation sections were written long ago > and before function "customize" was introduced. `M-x report-emacs-bug', but be specific in your enhancement request about which sections in which manuals.=20 > > > which on top of all does only accept constants as values > > > > Untrue. The `custom*' functions evaluate their args, > > so you can pass them any Elisp code you like, which > > is evaluated. The `custom-set-variables' form that's > > automatically written to your `custom-file' or init > > file uses quoted lists (constants) as the args. But > > that doesn't mean that `custom-set-variables' expects > > constant values as args. >=20 > Yes, I can use argument "NOW" to have "custom-set-variables" evaluate a > value. But if I ever have "customize" save customization changes to my > "custom.el" file, it writes back the evaluated value for this variable, > even if it wasn't changed. That's not really what I want, because after > saving the new customization this way, file "custom.el" is only usable > on this host, architecture, operating system, user, you-name-it, since > whatever "getenv" returned in the moment of saving the customization is > now hardwired into my "custom.el". Yes. Customize itself isn't designed to take any sort of conditional reasoning/code a user might have in mind into account. For that users have Elisp. ;-) A given user option could have a :set function that takes platform, release, or whatever into account and DTRT. But that's up to the person who designs/adds that option to do. Customize can't guess what any such relevant conditional handling might be. > > You can have any number of separate config files, > > which you load from your init file. >=20 > Configuration files: yes. But customization files? Even if I set vari- > able "custom-file" before running "M-x customize" -- after saving the > changes, the file "custom-file" is pointing to would contain _ALL_ cur- > rently loaded customization not only that from the single customization > file I wanted to update! My point was that you're not limited to a single file, `custom-file'. You can code whatever option & face behaviors you want, in as many of your own files as you like, using any conditional behavior you like/need. The point really is that if you want to customize a user option, you should take into account any :set and :init etc. functions its defcustom uses. There are custom* functions that do this for you. But you're not obliged to use them. You can code the same or other behavior you like, to handle :set, :init, etc.