all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Howto run guix.el correctly?
Date: Tue, 25 Nov 2014 16:58:39 +0300	[thread overview]
Message-ID: <87vbm3v0ts.fsf@gmail.com> (raw)
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")

[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]

Ludovic Courtès (2014-11-24 23:42 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> No need to fiddle with ‘geiser-scheme-dir’: it should be set properly if
>> you have ‘(require 'geiser-install)’ in your emacs config.
>
> Oops, indeed, PEBKAC: I was just unaware of ‘geiser-install’, 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
<http://lists.gnu.org/archive/html/guix-devel/2014-08/msg00165.html>, 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
  "…-autoloads.el", for example);

- to modify “guix-init.el” so that (require 'guix-init) will load those
  autoloads files;

- to write some elisp code for auto-loading "…-autoloads.el" on the fly
  — i.e., to make it possible to install an Emacs package using
  "guix.el" and to use "M-x <package-command>" 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 …" 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-emacs-Add-geiser-autoloads.el.patch --]
[-- Type: text/x-diff, Size: 1296 bytes --]

From 49faffe688c53e9d9197ac9e07511ba0de501840 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
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


  reply	other threads:[~2014-11-25 13:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 22:28 Howto run guix.el correctly? Adam Pribyl
2014-11-22  8:03 ` Alex Kost
2014-11-22 10:52   ` Ludovic Courtès
2014-11-22 12:04     ` Alex Kost
2014-11-22 18:49 ` Alex Kost
2014-11-22 21:04   ` Adam Pribyl
2014-11-22 21:11     ` David Thompson
2014-11-22 22:17       ` Ludovic Courtès
2014-11-23  7:01         ` Alex Kost
2014-11-24 20:42           ` Ludovic Courtès
2014-11-25 13:58             ` Alex Kost [this message]
2014-11-26 16:23               ` Ludovic Courtès
2014-11-26 20:38                 ` Alex Kost
2014-11-26 22:41                   ` Ludovic Courtès
2014-12-01 12:20                     ` Alex Kost
2014-12-01 12:49                       ` Ludovic Courtès
2014-12-02  7:46                         ` Alex Kost
2014-12-02  8:39                           ` Ludovic Courtès
2014-12-02 19:13                             ` Alex Kost
2014-11-26 20:14     ` Alex Kost
  -- strict thread matches above, loose matches on Subject: below --
2014-12-01 17:15 Federico Beffa
2014-12-02  7:52 ` Alex Kost

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbm3v0ts.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.