From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Howto run guix.el correctly? Date: Tue, 25 Nov 2014 16:58:39 +0300 Message-ID: <87vbm3v0ts.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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtGdk-0007g6-6N for guix-devel@gnu.org; Tue, 25 Nov 2014 08:58:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtGde-0003R8-VN for guix-devel@gnu.org; Tue, 25 Nov 2014 08:58:48 -0500 In-Reply-To: <87zjbg8h4x.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 24 Nov 2014 21:42:38 +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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2014-11-24 23:42 +0300) wrote: > Alex Kost skribis: > >> No need to fiddle with =E2=80=98geiser-scheme-dir=E2=80=99: it should be= set properly if >> you have =E2=80=98(require 'geiser-install)=E2=80=99 in your emacs confi= g. > > Oops, indeed, PEBKAC: I was just unaware of =E2=80=98geiser-install=E2=80= =99, and > everything was fine when I used Geiser from ELPA because that happens > automagically. Yes, that's the point: if you install Emacs packages using the Emacs package system, everything should work out of the box. If a package is installed manually or with some distro's package manager, a user needs to figure out what he should put in his config to "complete" the installation. > It would be nice if guix.el somehow had that works-out-of-the-box > property when installing Emacs extensions. :-) 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); - to modify =E2=80=9Cguix-init.el=E2=80=9D so that (require 'guix-init) wil= l 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. 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. I'm going to send patch(es) for the elisp code later. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-emacs-Add-geiser-autoloads.el.patch >From 49faffe688c53e9d9197ac9e07511ba0de501840 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Tue, 25 Nov 2014 16:50:11 +0300 Subject: [PATCH] gnu: emacs: Add "geiser-autoloads.el". * gnu/packages/emacs.scm (geiser): Add 'post-install' phase for creating "geiser-autoloads.el". --- gnu/packages/emacs.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 119c613..bde707d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -135,6 +135,15 @@ editor (without an X toolkit)" ) (sha256 (base32 "1mrk0bzqcpfhsw6635qznn47nzfy9ps7wrhkpymswdfpw5mdsry5")))) (build-system gnu-build-system) + (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))) (inputs `(("guile" ,guile-2.0) ("emacs" ,emacs))) (home-page "http://nongnu.org/geiser/") -- 2.1.3 --=-=-=--