From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: guix.el vs. Emacs packages
Date: Thu, 28 Aug 2014 18:12:31 +0400 [thread overview]
Message-ID: <871ts0n1o0.fsf@gmail.com> (raw)
In-Reply-To: <87zjeode80.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 28 Aug 2014 13:51:27 +0200")
[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]
Ludovic Courtès (2014-08-28 15:51 +0400) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
> [...]
>
>> 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").
>
> I think it should be quite easy to extend the emacs-utils module that
> Mark added with a procedure to generate an autoloads file.
>
> I would be nice to have an ‘emacs-build-system’ with an additional phase
> that does the autoloads generations. However, looking at the packages
> in emacs.scm, it seems there’s almost no common denominator. So maybe
> emacs-build-system would gnu-build-system + autoload-generation phase.
>
> Thoughts?
You are right, I think. No thoughts actually until I cope with your
notes on scheme code for “guix.el”.
>> 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:
>>
>> (mapc load
>> (directory-files "~/.guix-profile/share/emacs/site-lisp"
>> t "-autoloads.el$"))
>>
>> So there would be no need to put “(autoload 'foo "foo-mode" ...)” in
>> your ".emacs" for all those commands you want to use.
>
> Indeed.
>
> How does package.el handles that actually? Everything package installed
> with it is automatically loaded on startup, without having to add a
> single line to ~/.emacs.
After a user's "~/.emacs" (or "~/.emacs.d/init.el") is loaded, Emacs
calls ‘package-initialize’ function (if ‘package-enable-at-startup’ is
non-nil), which does the job: it cycles through all subdirs (for the
newest packages, as there may be several versions installed) from
‘package-user-dir’ and ‘package-directory-list’ vars and loads all
autoloads from those subdirs.
So "guix-init.el" may provide analogous function:
[-- Attachment #2: Type: application/emacs-lisp, Size: 537 bytes --]
[-- Attachment #3: Type: text/plain, Size: 225 bytes --]
Thus with “(require 'guix-init)” in ".emacs" a user will get all needed
autoloads (and it will work even faster than “package.el” as
"guix-init.el" will be tiny while “package.el” is rather big).
--
Alex
next prev parent reply other threads:[~2014-08-28 14:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 9:12 guix.el vs. Emacs packages Ludovic Courtès
2014-08-28 11:21 ` Alex Kost
2014-08-28 11:51 ` Ludovic Courtès
2014-08-28 14:12 ` Alex Kost [this message]
2014-08-28 19:56 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871ts0n1o0.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).