all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: Question about defcustom and :set-after
Date: Tue, 01 May 2018 09:20:11 -0700	[thread overview]
Message-ID: <87sh7bz6tg.fsf@ericabrahamsen.net> (raw)
In-Reply-To: jwvk1so11tt.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@IRO.UMontreal.CA> 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




      reply	other threads:[~2018-05-01 16:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01  0:00 Question about defcustom and :set-after Eric Abrahamsen
2018-05-01  0:37 ` Stefan Monnier
2018-05-01  1:33   ` Eric Abrahamsen
2018-05-01  3:54     ` Stefan Monnier
2018-05-01 16:20       ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sh7bz6tg.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.