From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Howto run guix.el correctly? Date: Wed, 26 Nov 2014 17:23:51 +0100 Message-ID: <87y4qyszfs.fsf@gnu.org> 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> 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]:50243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtfNo-0007Y4-2W for guix-devel@gnu.org; Wed, 26 Nov 2014 11:24:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtfNi-00023U-Cy for guix-devel@gnu.org; Wed, 26 Nov 2014 11:24:00 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:40976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtfNi-00022x-46 for guix-devel@gnu.org; Wed, 26 Nov 2014 11:23:54 -0500 In-Reply-To: <87vbm3v0ts.fsf@gmail.com> (Alex Kost's message of "Tue, 25 Nov 2014 16:58:39 +0300") 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: Alex Kost Cc: guix-devel@gnu.org 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? > - to modify =E2=80=9Cguix-init.el=E2=80=9D so that (require 'guix-init) w= ill load those > autoloads files; > > - to write some elisp code for auto-loading "=E2=80=A6-autoloads.el" on t= he 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 from $top_builddir. 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 emac= s-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) Or better yet, (guix build emacs-utils) could provide %standard-emacs-phases. WDYT? Thanks, Ludo=E2=80=99.