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:19:25 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20184"; 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:20:51 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 1qskwE-0005A0-Oq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Oct 2023 16:20:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qskw2-0007ZH-NL; Tue, 17 Oct 2023 10:20:38 -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 1qskw1-0007Z9-LN for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 10:20:37 -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 1qskw1-0006Nm-Ca for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 10:20:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qskwQ-0002KP-4Y for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2023 10:21:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2023 14:21: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.16975524048870 (code B ref 23926); Tue, 17 Oct 2023 14:21:02 +0000 Original-Received: (at 23926) by debbugs.gnu.org; 17 Oct 2023 14:20:04 +0000 Original-Received: from localhost ([127.0.0.1]:60775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qskvU-0002Iz-9C for submit@debbugs.gnu.org; Tue, 17 Oct 2023 10:20:04 -0400 Original-Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:60765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qskvQ-0002IN-AU for 23926@debbugs.gnu.org; Tue, 17 Oct 2023 10:20:03 -0400 Original-Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-5aed4f0e90bso2343855a12.1 for <23926@debbugs.gnu.org>; Tue, 17 Oct 2023 07:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697552368; x=1698157168; darn=debbugs.gnu.org; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Ux5bGx9j4D7htTkesFKohKwLjZLv0InTzDVFnoSaa/0=; b=XOGF1zbTj0imT+kRk2XHeMR36ZdiKBakRc/UUg5DPcmIa//KlaX65A95hdFmDcoINv DDoLgqwWPs0saQrNtgyheDhS+LolDNyt5HZkuuToaiW/Va0xksNpNMtj4BUh2hwN+PuO M6RS/Rzex+a+AlTCU89XLA28u1WkEuSRVaFOtz8JjKodR/ZFFaTlHDZz6JeTmemGQoFe /d7cKsdPm5zdPxgh48EP6BO8AZki0S1OS7UvzrPNXd+OcxhSsdS5PYfoFUyykOBqftEv 1Q3SVyQ80A39ySWrPaKMIBTBiWzbW/q+0WWRZc55nv1nhivDjD3ijUI1UYECJJ3z9C89 febA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697552368; x=1698157168; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Ux5bGx9j4D7htTkesFKohKwLjZLv0InTzDVFnoSaa/0=; b=jNSUIRi1lLSVDFOtp0kXlwT4AOLV0PQyzWurG+IZwwKkFbcGvCikM8HTBmWoOyxBZr ZLGP1h5MnVQrxOLAuz/wWy3BbDG1GBH574aN2Y/cMZaoAykZKT2vIQyR3jg0OtChVprg HhkjMrCPcndZW8sXktnL/82bOp5HghgV8cSSwemL5nL8D7MgB4FpIorzWH8ORR0UAPgy JoqUZPYEBDbs4sr+eFJwSRXT8DXWROucpSNuF21k4yXACAX4G1mUnSzmdKn6I7ikbte8 xGdkUwAA1O7Jsm5RZ7JocAddUCbOwTPXJY4IlpZSWTUgoITE08xz5sbq+fQ7m8Fdcg7h FIDg== X-Gm-Message-State: AOJu0YwQI9f0sGcoXBFoDlCMnwAodh7Xq5a0lE6m8n3fRkBobJYuoTz/ odzeSjSOZw67IOyLyz+wClsKqcvytP9MKA== X-Google-Smtp-Source: AGHT+IGkWJLHtJBf7p5sQPXb6xfQOFk/kK6Hu6co0lxWAZQNo0kT/NJot5XXjrPO/HVzRDwNP1W6tA== X-Received: by 2002:a05:6a20:9193:b0:15d:c274:2eb1 with SMTP id v19-20020a056a20919300b0015dc2742eb1mr2249449pzd.10.1697552368235; Tue, 17 Oct 2023 07:19:28 -0700 (PDT) Original-Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id p6-20020a631e46000000b00577d53c50f7sm1448685pgm.75.2023.10.17.07.19.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 07:19:27 -0700 (PDT) Content-Language: en-US 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:272611 Archived-At: I took a look at this Bug Report and all of the discussion. I do agree with Eli that passing to default the following (current-time-string) is quite nonsensical, but I understand that the reproducer was just to show a way to see some inconsistency happening. So I set out to look if there are occurrences like that in current Emacs sources.  And there is one comparable: (defcustom archive-tmpdir   ;; make-temp-name is safe here because we use this name   ;; to create a directory.   (make-temp-name    (expand-file-name (if (eq system-type 'ms-dos) "ar" "archive.tmp")              temporary-file-directory))   "Directory for temporary files made by `arc-mode.el'."   :type 'directory) That expression will evaluate to something different every time.  So, to see the problems reported here, in actual Emacs source code: emacs -Q (require 'arc-mode) C-h v archive-tmpdir See that "the original value", as claimed incorrectly by C-h v (I agree with Drew here about this terminology being non-accurate) is different from the value of archive-tmpdir. Kill the *Help* buffer and do again: C-h v archive-tmpdir The value of archive-tmpdir is the same, of course, but not "the original value". M-x customize-option RET archive-tmpdir will show, as reported, that archive-tmpdir was changed outside of Customize.  That's not true, it's just that the standard-value changed, and there's no support for that.  Those two things are different to me. I'm not saying that there's need to code something in Custom to handle these cases.  At least, I'm not yet convinced.  But the case of archive-tmpdir shows us, I think, that something needs to be done.  For example, change the standard value to something that doesn't change that often, or use the exact same form but wrap the defcustom in a let form, so that a constant expression gets saved as the standard-value.