From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Question about defcustom and :set-after Date: Mon, 30 Apr 2018 23:54:15 -0400 Message-ID: References: <87vac8z1lv.fsf@ericabrahamsen.net> <87muxk17oz.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1525146785 31998 195.159.176.226 (1 May 2018 03:53:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 May 2018 03:53:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 01 05:53:01 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fDMLc-0008Bm-UY for ged-emacs-devel@m.gmane.org; Tue, 01 May 2018 05:53:01 +0200 Original-Received: from localhost ([::1]:34678 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDMNi-0006Zk-9k for ged-emacs-devel@m.gmane.org; Mon, 30 Apr 2018 23:55:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDMN4-0006ZS-RR for emacs-devel@gnu.org; Mon, 30 Apr 2018 23:54:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDMN0-0007tW-SX for emacs-devel@gnu.org; Mon, 30 Apr 2018 23:54:30 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:39342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDMN0-0007sw-N0 for emacs-devel@gnu.org; Mon, 30 Apr 2018 23:54:26 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w413sFY3002933; Mon, 30 Apr 2018 23:54:16 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 863CE66375; Mon, 30 Apr 2018 23:54:15 -0400 (EDT) In-Reply-To: <87muxk17oz.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 30 Apr 2018 18:33:00 -0700") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6275=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6275> : inlines <6598> : streams <1785587> : uri <2634704> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225008 Archived-At: > Being entirely too lazy, I intended it to be run from a running Emacs > session. I understand the lazy guy wants to run it from within its session, *but* the lazy guy wants to implement it such that it works from "emacs -Q". So as the guy who's trying to implement it, your laziness argument seems counterintuitive. > The question remains, though: I think several of Gnus' defcustom's might > need :set-after clauses. Notice that the order in which to evaluate those settings depends on the settings themselves, so the issue is non-trivial. Also :set-after doesn't do what you want here: it only affects the order in which customized vars are customized, but it doesn't cause vars to be re-evaluated. It's for use for example when variable B should be set after A because setting B causes something to happen (e.g. it's a minor mode so setting it causes the mode to be loaded and enabled, so if B affects this minor mode, we want to set it before the mode is enabled). What you describe is currently simply not supported by Custom :-( You can approximate it by adding :setter functions, but it's messy, fragile, and only solves some use cases. Stefan