emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/package+vc 04c4c578c7 3/4: Allow for packages to be installe


From: Stefan Monnier
Subject: Re: feature/package+vc 04c4c578c7 3/4: Allow for packages to be installed directly from VCS
Date: Wed, 16 Feb 2022 21:56:19 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>>> I'm sorry, I don't understand what you're saying here.  Who&how does
>>>> "just clone a project into elpa/devel" and what do you mean by 
>>>> "elpa/devel"?
>>>
>>> What I meant was that all directories in ~/.emacs.d/elpa/devel could be
>>> automatically detected and loaded.
>>
>> That's already the case if `~/.emacs.d/elpa/devel` is in
>> `package-directory-list`, so I don't understand how that relates to what
>> we're discussing.
>
> Unless I am mistaken, `package--make-autoloads-and-stuff' is currently
> only invoked by `package-unpack', that in turn is only called by the
> `package-install-from-*' functions.  Am I missing something, or how
> would the autoload file be generated if I just place a repository into
> ~/.emacs.d/elpa/devel?

I don't think we should spend too much time trying to support the case
where a user only does `git clone` and expects Emacs to notice the new
package and set it up magically.  Instead, I'd expect
`package-activate-all` to warn the user about a missing `<pkg>-pkg.el`
when collecting the available packages and about a missing
`<pkg>-autoloads.el` file when trying to activate a given package.

Then the user can use some `package-<foo>-refresh` or somesuch to
(re)create those files (and (re)compile the `.el` files along the way
and (re)generate the docs, ...).

> Say a repository consists of only an init.el, and a few submoduled git
> repositories under /elpa/devel/.  These wouldn't include the -pkg.el or
> -autoload.el files, so they should be generated as soon as necessary.

Let those users write specific code for that if they so wish.
Generating the `<pkg>-pkg.el` file as well as the `<pkg>-autoloads.el`
cannot be done fully automatically in all cases.  More specifically it
may require the package's spec to find the `:main-file` and other such
things.  I don't think we should aim for that level of automation yet.


        Stefan




reply via email to

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