From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: Question about defcustom and :set-after Date: Tue, 01 May 2018 09:20:11 -0700 Message-ID: <87sh7bz6tg.fsf@ericabrahamsen.net> 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 1525191667 23853 195.159.176.226 (1 May 2018 16:21:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 May 2018 16:21:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 01 18:21:03 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 1fDY1W-00066Q-Rh for ged-emacs-devel@m.gmane.org; Tue, 01 May 2018 18:21:02 +0200 Original-Received: from localhost ([::1]:45161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDY3d-00035y-RY for ged-emacs-devel@m.gmane.org; Tue, 01 May 2018 12:23:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDY3X-00035d-Cp for emacs-devel@gnu.org; Tue, 01 May 2018 12:23:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDY3S-0006no-IZ for emacs-devel@gnu.org; Tue, 01 May 2018 12:23:07 -0400 Original-Received: from [195.159.176.226] (port=50708 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDY3S-0006nO-Bm for emacs-devel@gnu.org; Tue, 01 May 2018 12:23:02 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fDY1G-0005oA-DB for emacs-devel@gnu.org; Tue, 01 May 2018 18:20:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:AICDWaYJ2qjEAXWl8EBnc+dp+mM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:225014 Archived-At: Stefan Monnier writes: >> 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. I thought working very hard in the pursuit of ultimately laziness was the essence of programming :) I'll just do an "emacs -Q" version for now, and leave the excessive cleverness for later. Once I've got a basic working version, I'll put up a bug report. >> 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. That's too bad. At least in this case, if I'm not trying to make Gnus mock shadow an existing Gnus setup, this won't be a problem. Thanks, Eric