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

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

Re: use-package :after ??


From: Eli Zaretskii
Subject: Re: use-package :after ??
Date: Fri, 12 May 2023 09:33:42 +0300

> From: Ruijie Yu <ruijie@netyu.xyz>
> Cc: Eli Zaretskii <eliz@gnu.org>, help-gnu-emacs@gnu.org
> Date: Fri, 12 May 2023 09:18:14 +0800
> 
> David Masterson <dsmasterson@gmail.com> writes:
> 
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> >> Depends how? via autoloads or via :after?
> >>
> >> And why does it make thing more complicated?  If package FOO should be
> >> loaded after BAR, and BAR should be loaded after BAZ, then the order
> >> I'd expect should be: BAZ, then BAR, then FOO.  Right?
> >
> > Yes. Will that be handled properly by the following (with global
> > deferred loading)?
> >
> > (use-package foo :after bar
> >  :config (foo-setup)
> >  )
> > (use-package bar :after baz
> >  # :demand t
> > )
> > (use-package baz)
> >
> > In particular, use-package will ensure foo-setup is called after foo is
> > loaded, right? If I uncommented the :demand, should/would that make a
> > difference?
> >
> > I may be overthinking this because of my org-ac issue and this looked
> > like an obvious debugging approach.
> 
> I attach my scratch session after macroexpanding with the :demand t
> (after a pretty-print because I don't think having everything on one
> line helps much).  You should be able to figure out the answer to your
> question by looking at the generated form and playing around with the
> macroexpand form.

Thanks, but the discussion here is centered on the documentation of
use-package and whether it needs some improvements and clarifications.
There should be no need to examine the macro-expansion of
use-package's macros to reason about the documentation clarity.



reply via email to

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