From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Howto run guix.el correctly? Date: Wed, 26 Nov 2014 23:38:05 +0300 Message-ID: <87ioi1u28i.fsf@gmail.com> References: <87d28fgjfn.fsf@gmail.com> <8761e7aqkt.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87mw7ianj5.fsf@gnu.org> <87tx1qv1rp.fsf@gmail.com> <87zjbg8h4x.fsf@gnu.org> <87vbm3v0ts.fsf@gmail.com> <87y4qyszfs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtjLq-0000Ot-2Y for guix-devel@gnu.org; Wed, 26 Nov 2014 15:38:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtjLk-0007GM-Jb for guix-devel@gnu.org; Wed, 26 Nov 2014 15:38:14 -0500 In-Reply-To: <87y4qyszfs.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 26 Nov 2014 17:23:51 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2014-11-26 19:23 +0300) wrote: > Alex Kost skribis: > >> As I wrote at >> , I >> see the only way to achieve that: >> >> - to modify emacs package recipes so that they will provide some files >> with all required initial configuration (and to name such file >> "=E2=80=A6-autoloads.el", for example); > > =E2=80=98FOO-autoloads.el=E2=80=99 is the most common convention, right? I think there is no any convention on this, but emacs package system generates =E2=80=9Cfoo-autoloads.el=E2=80=9D indeed. >> - to modify =E2=80=9Cguix-init.el=E2=80=9D so that (require 'guix-init) = will load those >> autoloads files; >> >> - to write some elisp code for auto-loading "=E2=80=A6-autoloads.el" on = the fly >> =E2=80=94 i.e., to make it possible to install an Emacs package using >> "guix.el" and to use "M-x " immediately. > > Yep, that sounds good. > >> So if it's acceptable, what about modifying the current recipes >> step-by-step. With geiser it's easy: as "geiser-install.el" provides >> all required setup (including autoloads for "M-x =E2=80=A6" commands), >> "geiser-autoloads.el" may just be a symlink to "geiser-install.el". I'm >> attaching the patch for that. > > Yes. > >> + (arguments >> + '(#:phases (alist-cons-after >> + 'install 'post-install >> + (lambda* (#:key outputs #:allow-other-keys) >> + (symlink "geiser-install.el" >> + (string-append (assoc-ref outputs "out") >> + "/share/emacs/site-lisp/" >> + "geiser-autoloads.el"))) >> + %standard-phases))) > > This particular instance won=E2=80=99t work because it=E2=80=99s called f= rom > $top_builddir. Sorry I didn't understand why it wouldn't work. I tried it and it worked as I expected: a proper "geiser-autoloads.el" symlink was created. > Actually, since it=E2=80=99s going to be used in most packages, what about > adding an =E2=80=98install-autoloads=E2=80=99 procedure in (guix build em= acs-utils)? > So the above would become > > (alist-cons-after > 'install 'post-install > (lambda* (#:key outputs #:allow-other-keys) > (install-autoloads (assoc-ref outputs "out"))) > %standard-phases) OK. > Or better yet, (guix build emacs-utils) could provide > %standard-emacs-phases. > > WDYT? The problem is that I don't understand what these %standard-emacs-phases should be, that's why I wanted to do it step-by-step. I don't see general patterns right now. Some packages would require just making a link as with geiser, other packages require generating autoloads and maybe some others require additional steps. What about making "wip-emacs-packages" branch and to put the appropriate changes there for now? --=20 Alex