Closed montchr closed 5 months ago
Thanks for the suggestions.
provide a new
use-package
keyword to include the call at the end of the macro expansion.
It would be more flexible to introduce a recipe keyword which will run elpaca-wait
immediately after the package is queued.
This way it can be used with, or without, use-package. e.g.
(use-package test :ensure (:wait t))
;; Expansion is "vanilla" syntax:
;; (elpaca (test :wait t))
See the output of the following two tests:
elpaca | e8552ec HEAD -> feat/wait-recipe-keyword, origin/feat/wait-recipe-keyword |
installer | 0.6 |
emacs | GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-02-03 |
git | git version 2.43.0 |
elpaca | e8552ec HEAD -> feat/wait-recipe-keyword, origin/feat/wait-recipe-keyword |
installer | 0.6 |
emacs | GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-02-03 |
git | git version 2.43.0 |
I'll have to do some more testing and think about the design a bit, but what do you think of that idea in general?
Also, maybe: a new user option to always include an
elpaca-wait
call when theuse-package
declaration would not result in a deferred load (e.g. when:demand t
is specified). I could see this as being potentially counter-intuitive, however, especially whenuse-package-always-defer
is nil.
I think this suggestion might be too confusing for the reason you pointed out.
Loading a package and ensuring its queue is processed aren't necessarily the same, either. It's valid to :demand t
a package so it is immediately required after its queue is processed, but for its installation to take place asynchronously.
Does that make sense?
I'll have to do some more testing and think about the design a bit, but what do you think of that idea in general?
I like it, and it totally makes sense to include as a recipe keyword since the feature would be useful with or without use-package. Thanks for improving upon my initial suggestion!
I think this suggestion might be too confusing for the reason you pointed out.
Loading a package and ensuring its queue is processed aren't necessarily the same, either. It's valid to:demand t
a package so it is immediately required after its queue is processed, but for its installation to take place asynchronously.
Does that make sense?
Definitely. I often use a use-feature!
macro wrapper for use-package (originally based on the one from your personal config). There are some cases when I'm using :demand t
there, which I think demonstrates a case like you described.
@progfolio is it possible to use the :after
functionality of use-package with elpaca? I'm trying to load a package after another package is loaded without much success
@progfolio is it possible to use the
:after
functionality of use-package with elpaca? I'm trying to load a package after another package is loaded without much success
It is. Please open a separate support issue with the details and I can help.
I've added a :wait
recipe keyword as described above. Testing is appreciated.
Feature Description
In addition to the existing usage of
elpaca-wait
by calling it at the top-level of init files, provide a newuse-package
keyword to include the call at the end of the macro expansion.Also, maybe: a new user option to always include an
elpaca-wait
call when theuse-package
declaration would not result in a deferred load (e.g. when:demand t
is specified). I could see this as being potentially counter-intuitive, however, especially whenuse-package-always-defer
is nil.Usage
Expansion
Confirmation