From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#23926: defcustom with STANDARD= gives confusing results Date: Tue, 17 Oct 2023 11:29:48 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33484"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , Noam Postavsky , Drew Adams To: 23926@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 17 16:31:03 2023 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 1qsl66-0008Yu-Q1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Oct 2023 16:31:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qsl5o-0007mu-Nb; Tue, 17 Oct 2023 10:30:44 -0400 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 1qsl5j-0007hj-FF for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 10:30:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsl5h-0002ej-1F for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 10:30:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qsl66-0002jf-3M for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 10:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2023 14:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23926 X-GNU-PR-Package: emacs Original-Received: via spool by 23926-submit@debbugs.gnu.org id=B23926.169755302910475 (code B ref 23926); Tue, 17 Oct 2023 14:31:02 +0000 Original-Received: (at 23926) by debbugs.gnu.org; 17 Oct 2023 14:30:29 +0000 Original-Received: from localhost ([127.0.0.1]:60784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsl5Y-0002it-M4 for submit@debbugs.gnu.org; Tue, 17 Oct 2023 10:30:29 -0400 Original-Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:48507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsl5T-0002iU-Sy for 23926@debbugs.gnu.org; Tue, 17 Oct 2023 10:30:27 -0400 Original-Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1c9b95943beso48067155ad.1 for <23926@debbugs.gnu.org>; Tue, 17 Oct 2023 07:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697552992; x=1698157792; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=H5b0Sl42TyARJvy8nDJS5zDipnteN5qgH1+Y6Q1rk/Y=; b=lyk9I1+7GXmNEIGjxjAl7IA2wguv3211sTCzuHi4i/fyuTP4hzvM/LPQJu+h2E9fi1 UzsXhYQDLZXsNoq5kw3JidZg3wjEIPbWBzoHIcp5L5pyrVtB8E7FZKkoPPFDq2V9JjxB i/6lPhYWW4yDRAk8Me1Fz/MTFLjaCvyDLTvobsfyXgM98K8ea88294qA6Hz9YgTJ9Dnn MXMLaJIbXYExNZE2mJCZwT96C0UVy19BKuFKTGzsPPmZizx5Qtc/MPLzomRCedmKdboM +Tb3RX0qKgDtrpsLsbTuVmzcjId4Bgk19N1sFh9xOT3pa+b3jyPfbjHAWjtsVIIKz35r qFqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697552992; x=1698157792; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H5b0Sl42TyARJvy8nDJS5zDipnteN5qgH1+Y6Q1rk/Y=; b=xFJ24M1Fkyl54srkwE/ZAQlRskyWFK2bgcml9FsT//tFxVE+wINpCG7tvKCQ+E42Mk tNuEVelaNTgt4WOGhlbDxUog5v6Sr0g72qy/jAqEuaPfi2LlHltrgFaN+iNc5oBXsNHf hSIAF8hVQcx4Gu4eG2sZdXgIt3XsqaHq3dt4iX3ay2qL3fb+vJ26qYZSkDJ9FdtomR6F z9tZxzuTsszFGaUqsP0PQqwDbLovHoQMiyngBmZY5raKD0CatRzBo85RcgxIcl+0Sitn ZXRMQnlmGnjpZy3whjS/Lc4hudlmepqpTkO/02AP+Ga35Q15HOQRrDWIBvopABttU3ol p4uQ== X-Gm-Message-State: AOJu0Yxyc6h5wZqA83Gkwwr2YAVXmTw77d0D4dDd4yNQ9XrM1sFER40z u//eqBZZRM3YCnUEjqPolIHbSQkmUgVQKg== X-Google-Smtp-Source: AGHT+IFqCAdqiGJzllG+mQ4MkZqT0p6H51ebOZ7EssPSbwC92SHVoIYiNHulBHz+mJa6MfforHZONA== X-Received: by 2002:a17:902:ea0c:b0:1bb:c06e:647a with SMTP id s12-20020a170902ea0c00b001bbc06e647amr3123508plg.53.1697552991615; Tue, 17 Oct 2023 07:29:51 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id l13-20020a170903244d00b001c8a0879805sm1612023pls.206.2023.10.17.07.29.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 07:29:51 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:272612 Archived-At: In case it wasn't clear in my previous message, I'm focusing on the Customize part of the problem here. I went through a lot of the defcustoms we have in source, and found out that there are many, so many, that can potentially show this inconsistency. The one that's comparable to the test case given is archive-tmpdir, but there are others. I've classified them in 6 categories, as: - Standard value changes every time its standard form is evaluated This is archive-tmpdir. - Standard value depends on special conditions in an Emacs session For example, highlight-changes-colors depends on the background-mode frame parameter. I've seen it's somewhat common to use different themes (light and dark) in a session, so using a frame-parameter query as standard is not optimal. There are other cases like erc-nicks-bg-color, vc-annotate-background-mode, etc. - Standard value depends on some external (usually OS-related) condition These are mostly defcustoms that try to find a program available. Examples are remote-shell-program, wallpaper-command, etc. The standard values could change, potentially, if some program gets installed while an Emacs session is active. - Standard value depends on a built-in option Take for example ido-case-fold, or ibuffer-case-fold-search. If those options get defined and after that the user customizes case-fold-search, it will exhibit the inconsistency presented in this bug report. What's worse, is that the current session may show a different behavior than a new session, if the user saves the customization for case-fold-search. - Standard value depends on an option from the same package gnus-*-directory options are a good example here. - Standard value depends on another's package option For example, erc-button-url-regexp that depends on browse-url-button-regexp. - Standard value depends on finding an Emacs-related file This is usually detected with a call to locate-user-emacs-file with two arguments, trying to keep backward-compatibility with an older filename. For example, bookmark-default-file, diary-file, timeclock-file, etc. I left this for last, because while it might potentially show the problem, it should be rare enough to consider it a non-issue. That's a summary of what I've found. I would like to find a way to make the Customize part of this problem less confusing (or better, no confusing at all), keeping in mind backward-compatibility, of course. I don't have any clear ideas yet.