I saw that use-package has an :after
section that can be used, which:
Defer loading of a package until after any of the named features are loaded.
The wording uses "any" instead of "all", so would that mean that if I set something like :after one two three
, it will start loading even if only one
is loaded but not two
and three
? The source seems to show that this is the case, but I'm not entirely sure.
If this is the case, though, what is the point of specifying more than one feature? Wouldn't it be preferable to defer until all of the specified features are loaded?
I have trouble envisioning a scenario in which it would be useful to defer a package until any of the specified features is loaded. Perhaps I'm misunderstanding the purpose of :after
?
:after (latex org)
would essentially defer package X until either one of them was loaded, since X would be needed for either one. I guess that sounds obvious now that I say it, but I was pretty confused. I feel like that answered my question. If you like, write it up as an answer and I will accept it. – Jorge Israel Peña Jan 20 '16 at 9:22latex-mode
nororg-mode
are hypothetical (;)
) but that's the idea. I'll post an answer if nobody can come up with something better... this usecase still leaves me uncomfortable as "not the proper way". – T. Verron Jan 20 '16 at 9:26:after (latex-mode org-mode)
. It seems like you would have to write the feature names that definelatex-mode
andorg-mode
no? Any ideas on how to figure out what those are reliably? I triedc-h f latex-mode
for example to see which file it was defined in and to see if that had a(provides 'blah)
form, but I couldn't find any. – Jorge Israel Peña Jan 20 '16 at 9:29org
; Latex is more complicated: apparently the built-in mode providestex-mode
and AUCTeX providestex
. But any of the subfiles would work, for examplelatex
is provided bylatex.el
in AUCTeX and would work. – T. Verron Jan 20 '16 at 9:49