Hello,

Ludovic Courtès (2014-08-27 13:12 +0400) wrote:

> Hi!
>
> It would be really cool if, once a package with a share/emacs/site-lisp
> sub-directory has been installed, guix.el would offer to load it, just
> like package.el does.  (That would pretty much make guix.el a drop-in
> replacement, I think.)

Good idea!

If by “offer to load” you mean to load/require the whole package, this
is not what “package.el” does.  (I think you know the following but just
to clarify things): during installing a package, “package.el” generates
"...-autoloads.el" (it usually contains the main interactive commands)
and loads it.  And on emacs startup "...-autoloads.el" files for each
package are loaded, so that "M-x ..." for installed packages become
available.

So for the real “drop-in replacement”, the following should be done
(IMHO): Guix recipes for emacs packages should be modified to
additionally generate "...-autoloads.el" (like it is done by
“package.el”: for example using ‘update-directory-autoloads’ function if
a package has appropriate "autoload cookies").

And after an Emacs package is installed with “guix.el”, its
"...-autoloads.el" file may be loaded just like it is done by
“package.el”.

Moreover if each installed emacs package will have "...-autoloads.el",
these files may be loaded on emacs startup simply like this:

Attachment: bind2T1poMax6.bin
Description: application/emacs-lisp

So there would be no need to put “(autoload 'foo "foo-mode" ...)” in
your ".emacs" for all those commands you want to use.

--
Alex

Reply via email to