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

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

Re: use-package :after ??


From: Ruijie Yu
Subject: Re: use-package :after ??
Date: Fri, 12 May 2023 09:18:14 +0800
User-agent: mu4e 1.11.3; emacs 30.0.50

David Masterson <dsmasterson@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: David Masterson <dsmasterson@gmail.com>
>>> Cc: help-gnu-emacs@gnu.org
>>> Date: Wed, 10 May 2023 20:24:18 -0700
>>> 
>>> One thing I left out was that org-ac also depends on auto-complete-pcmp
>>> making the :after more complicated -- namely does order make a
>>> difference in how things should be loaded? 
>>
>> 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.

Attachment: macroexpand-result-scratch.eld
Description: Text document

-- 
Best,


RY

reply via email to

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