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: Wed, 17 May 2023 13:30:24 -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: Tue, 16 May 2023 13:44:25 -0700
>> 
>> > :after cannot force loading the parents, AFAIU.  I don't understand
>> > why you think it should (or could).
>> 
>> The :after(s) say there is a relationship between a, b, and c --
>> presumably, in the user's setup, a won't be used without b (same w/
>> b->c).
>
> No, :after says that a will be loaded immediately after b, and _only_
> if b is loaded.  If b is never loaded, neither will a.

So, you're saying, if (via :bind) I call a-mode before a and b have been
loaded (but their autoloads are setup), b will not be loaded and,
therefore, neither will a (because of :after) causing the call to a-mode
via the :bind to fail?  :bind is one of the triggers to autoload the
package (a in this case), so this would be unexpected.

In your mind, what is the use-case for :after?  If there is a
requirement that a must have b, you would expect a to require b
internally (no need for after).  If it is a user desire that, when he
uses a, he will also want b, then, if b is not loaded by the :after, the
user would have to use :config to require b defeating the need for
:after.

Am I missing something?!?  I wish I could put all of this discussion in
a set of test cases to run through Emacs.  Would ERT be the tool for
that (never used it)?

-- 
David Masterson



reply via email to

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