help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use-package :after ??


From: David Masterson
Subject: Re: use-package :after ??
Date: Sun, 14 May 2023 23:03:19 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: David Masterson <dsmasterson@gmail.com>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Thu, 11 May 2023 23:54:06 -0700
>> 
>> > In any case, if there's something unclear here, the problem might be
>> > with the description of :demand, not with :after -- the node "Forcing
>> > loading" says :demand is overridden by :defer, but says nothing about
>> > :after.
>> 
>> Possibly, but the above (made up) example was an attempt to determine if
>> :after might effect when the loads occur due to a side effect. Perhaps
>> this side effect might be important in certain cases.
>> 
>> Oh, that Info node says :demand is overridden by :defer, but docstring
>> for use-package-always-defer says assume :defer unless :demand is used.
>
> Are we still talking about :after?  My questions were meant to figure
> out whether :after's documentation needs some improvements.
>
> If everything is clear with :after, and we are talking about :demand
> and :defer, let's talk about those two.  The text you quote is about
> use-package-always-defer, not about :defer, so how is that a
> contradiction to whether :defer overrides :demand?

Question: why would anyone include both :defer and :demand in one
use-package?  Syntactically, it's appropriate to answer the question of
which takes precedence.  Semantically, though, most users wouldn't do
that.

My question goes to the effect of :after in connecting a tree of
packages that may have been setup with some :demand and some :defer.
This can occur by direct usage of :demand and :defer *or* by setting
use-package-always-defer and overriding it with :demand in some
packages.  Example:

(use-package a :defer t :after b)
(use-package b :demand t :after c)
(use-package c :defer t)

Does b force the loading of a and/or c because of :after and the mixed
:demand/:defer? Or is b forced to defer?

The potential (lack of?) side-effects here should be mentioned as it
might effect on :config for a, b, or c.

-- 
David Masterson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]