emacs-devel
[Top][All Lists]
Advanced

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

Re: Calling (package-initialize) sooner during initialization


From: Jorgen Schäfer
Subject: Re: Calling (package-initialize) sooner during initialization
Date: Sun, 12 Apr 2015 23:02:58 +0200

On Sun, Apr 12, 2015 at 10:44 PM, Stefan Monnier
<address@hidden> wrote:
>>> - package-load-list: Needs to be configured before.
>> If the user does not want to enable certain packages, they can move
>> them out of ~/.emacs.d/elpa/.
>
> Nope: package-directory-list can include system directories (with
> system-wide installed packages), so the user may not have the option to
> move them out of the directory.

My proposal does not talk about initializing anything in package-directory-list.

>>> - package-archives: Needs to be configured before for
>>>   non-interactive package installation.
>>> - package-pinned-packages: Needs to be configured before for
>>>   non-interactive package installation.
>>> - package-check-signature and package-unsigned-archives: Can be
>>>   customized afterwards.
>>> - package-directory-list: Needs to be configured before.
>> These are all only relevant for package installation, not for package
>
> True, except for package-directory-list which is very much used by
> package-initialize.

I was not talking about package-initialize.

To make myself a bit more clear, my proposal would mean adding these
lines of code to startup.el just before the user init file is loaded:

(dolist (dir (directory-files "~/.emacs.d/elpa" t "\\`[^.]"))
  (when (file-directory-p dir)
    (add-to-list 'load-path dir)
    (dolist (autoload (directory-files dir t "-autoloads.el\\'"))
      (load autoload nil t))))

This would solve the problem of users being confused because their
init file can not access packages they installed, allow all the heavy
package initialization to happen after the init file is processed, and
finally allow users to revert to the old behavior if they so choose by
setting package-user-dir to a different directory than ~/.emacs.d/elpa/.

Regards,
Jorgen



reply via email to

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