From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23926: defcustom with STANDARD= gives confusing results Date: Sun, 10 Jul 2016 17:19:15 +0300 Message-ID: <83k2gtfue4.fsf@gnu.org> References: >> <83vb0fgu83.fsf@gnu.org>>> <443f2e44-5167-48e7-abc6-cce1e243461e@default>> <8337nihpdw.fsf@gnu.org>> <83zipqg3e3.fsf@gnu.org> <871t32ilm0.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468160427 19021 80.91.229.3 (10 Jul 2016 14:20:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 14:20:27 +0000 (UTC) Cc: 23926@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 16:20:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMFai-0003Jl-2t for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 16:20:16 +0200 Original-Received: from localhost ([::1]:55359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFah-0004mf-BT for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 10:20:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFaY-0004iT-SW for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:20:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMFaU-0002Sx-KG for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:20:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFaU-0002Sp-Gv for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMFaU-0006cs-Dj for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jul 2016 14:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23926 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23926-submit@debbugs.gnu.org id=B23926.146816036925421 (code B ref 23926); Sun, 10 Jul 2016 14:20:02 +0000 Original-Received: (at 23926) by debbugs.gnu.org; 10 Jul 2016 14:19:29 +0000 Original-Received: from localhost ([127.0.0.1]:45196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMFZw-0006bv-MU for submit@debbugs.gnu.org; Sun, 10 Jul 2016 10:19:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMFZu-0006bi-UE for 23926@debbugs.gnu.org; Sun, 10 Jul 2016 10:19:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMFZo-0002BR-OZ for 23926@debbugs.gnu.org; Sun, 10 Jul 2016 10:19:21 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFZo-0002BN-LC; Sun, 10 Jul 2016 10:19:20 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2831 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMFZn-00082C-Sj; Sun, 10 Jul 2016 10:19:20 -0400 In-reply-to: <871t32ilm0.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120746 Archived-At: > From: npostavs@users.sourceforge.net > Cc: Drew Adams , 23926@debbugs.gnu.org > Date: Sat, 09 Jul 2016 16:48:23 -0400 > > > Of course, I do. Maybe you don't realize how many times Emacs > > evaluates the value of a defcustom, but I do. > > What about making Emacs evaluate it less? e.g. replace occurences of > (eval (car (get var 'standard-value))) with > > (or (get var 'original-value) > (let ((val (eval (car (get var 'standard-value))))) > (put var 'original-value val) > val)) What will that do to the likes of custom-reevaluate-setting? FWIW, I wouldn't try making any such changes in this area. The number of evaluations and the precise triggers for evaluating a defcustom is a fragile setup, and I'd hate breaking it. Certainly not for a marginal use case such as the one in this report. In effect, whoever uses current-time-string as a defcustom's value tells Emacs that the value is not important, because the programmer has no idea when in the process of building and restarting Emacs will the value be taken. Why does it make sense to rock the boat in this sensitive area for such use cases?