* Howto run guix.el correctly?
@ 2014-11-21 22:28 Adam Pribyl
2014-11-22 8:03 ` Alex Kost
2014-11-22 18:49 ` Alex Kost
0 siblings, 2 replies; 22+ messages in thread
From: Adam Pribyl @ 2014-11-21 22:28 UTC (permalink / raw)
To: guix-devel
I have folloed the instruction in
http://www.gnu.org/software/guix/manual/guix.html#Emacs-Interface
to get the emacs interface for guix, but there is something missing
probably.
Installation of emacs and geiser was OK, I changed the path to guix.el
(there is no /usr/share/ in my guix installation, I had to find guix.el in
the /gnu/store), after that I can start emacs and "M-x guix-..." but every
action says "Cannot open load file: no such file or directory
geiser-mode".
There should probably be also the geiser path in the emacs init file or
something?
Adam Pribyl
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
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 18:49 ` Alex Kost
1 sibling, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-11-22 8:03 UTC (permalink / raw)
To: Adam Pribyl; +Cc: guix-devel
Adam Pribyl (2014-11-22 01:28 +0300) wrote:
> I have folloed the instruction in
> http://www.gnu.org/software/guix/manual/guix.html#Emacs-Interface
> to get the emacs interface for guix, but there is something missing
> probably.
>
> Installation of emacs and geiser was OK, I changed the path to guix.el
> (there is no /usr/share/ in my guix installation, I had to find guix.el
> in the /gnu/store), after that I can start emacs and "M-x guix-..." but
> every action says "Cannot open load file: no such file or directory
> geiser-mode".
>
> There should probably be also the geiser path in the emacs init file or
> something?
Apparently a directory with geiser is not in your `load-path' variable,
so (require 'geiser-mode) fails.
Did you install geiser with guix? If so, you probably need to add
"~/.guix-profile/share/emacs/site-lisp" to `load-path'.
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 8:03 ` Alex Kost
@ 2014-11-22 10:52 ` Ludovic Courtès
2014-11-22 12:04 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-11-22 10:52 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Did you install geiser with guix? If so, you probably need to add
> "~/.guix-profile/share/emacs/site-lisp" to `load-path'.
Yes, and also something like:
(setq-default geiser-guile-load-path (list geiser-scheme-dir))
We should find a way to make things work out of the box.
Ludo’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 10:52 ` Ludovic Courtès
@ 2014-11-22 12:04 ` Alex Kost
0 siblings, 0 replies; 22+ messages in thread
From: Alex Kost @ 2014-11-22 12:04 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2014-11-22 13:52 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> Did you install geiser with guix? If so, you probably need to add
>> "~/.guix-profile/share/emacs/site-lisp" to `load-path'.
>
> Yes, and also something like:
>
> (setq-default geiser-guile-load-path (list geiser-scheme-dir))
Is it really needed? Geiser should respect ‘geiser-scheme-dir’ by
default.
> We should find a way to make things work out of the box.
These lines may just be added to “guix-init.el.in”.
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-21 22:28 Howto run guix.el correctly? Adam Pribyl
2014-11-22 8:03 ` Alex Kost
@ 2014-11-22 18:49 ` Alex Kost
2014-11-22 21:04 ` Adam Pribyl
1 sibling, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-11-22 18:49 UTC (permalink / raw)
To: Adam Pribyl; +Cc: guix-devel
Adam Pribyl (2014-11-22 01:28 +0300) wrote:
> I have folloed the instruction in
> http://www.gnu.org/software/guix/manual/guix.html#Emacs-Interface
> to get the emacs interface for guix, but there is something missing
> probably.
>
> Installation of emacs and geiser was OK, I changed the path to guix.el
> (there is no /usr/share/ in my guix installation, I had to find guix.el
> in the /gnu/store), after that I can start emacs and "M-x guix-..." but
> every action says "Cannot open load file: no such file or directory
> geiser-mode".
If you mean you did (add-to-list 'load-path "/gnu/store/..."), then it's
definitely not right.
> There should probably be also the geiser path in the emacs init file or
> something?
I assume you use a Guix (or GNU or whatever it should be called)
system. I must admit I have not tried it yet, and all I know about
setting "guix.el" there I learnt from a chat with davexunit on #guix
today.
So I think the following should be added to your emacs config:
- Add dirs with "guix.el" and "geiser" to load-path (I'm absolutely
not sure about the correctness of the paths, so double check please):
(add-to-list 'load-path "/run/current-system/profile/share/emacs/site-lisp/")
(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
- Initial setup of geiser:
(require 'geiser-install)
- Initial setup of guix:
(require 'guix-init)
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 18:49 ` Alex Kost
@ 2014-11-22 21:04 ` Adam Pribyl
2014-11-22 21:11 ` David Thompson
2014-11-26 20:14 ` Alex Kost
0 siblings, 2 replies; 22+ messages in thread
From: Adam Pribyl @ 2014-11-22 21:04 UTC (permalink / raw)
Cc: guix-devel
On Sat, 22 Nov 2014, Alex Kost wrote:
> Adam Pribyl (2014-11-22 01:28 +0300) wrote:
>
>> I have folloed the instruction in
>> http://www.gnu.org/software/guix/manual/guix.html#Emacs-Interface
>> to get the emacs interface for guix, but there is something missing
>> probably.
>>
>> Installation of emacs and geiser was OK, I changed the path to guix.el
>> (there is no /usr/share/ in my guix installation, I had to find guix.el
>> in the /gnu/store), after that I can start emacs and "M-x guix-..." but
>> every action says "Cannot open load file: no such file or directory
>> geiser-mode".
>
> If you mean you did (add-to-list 'load-path "/gnu/store/..."), then it's
> definitely not right.
>
>> There should probably be also the geiser path in the emacs init file or
>> something?
>
> I assume you use a Guix (or GNU or whatever it should be called)
> system. I must admit I have not tried it yet, and all I know about
> setting "guix.el" there I learnt from a chat with davexunit on #guix
> today.
>
> So I think the following should be added to your emacs config:
>
> - Add dirs with "guix.el" and "geiser" to load-path (I'm absolutely
> not sure about the correctness of the paths, so double check please):
>
> (add-to-list 'load-path "/run/current-system/profile/share/emacs/site-lisp/")
> (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
>
> - Initial setup of geiser:
>
> (require 'geiser-install)
>
> - Initial setup of guix:
>
> (require 'guix-init)
Right, I am testing it under GNU system (USB installed image with guix
0.8). Thanks for the point regarding geiser. This is now my ~/.emacs
(add-to-list 'load-path
"/gnu/store/ysh4fvnxr0p8xrphcikivpafgvf6g18m-guix-0.8/share/emacs/site-lisp/")
(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
(require 'geiser-install)
(require 'guix-init)
Reason for the /gnu/store path is, that guix.el is a part of guix and I
did not found it in any profile. I've added my profile path, where the
geiser is (as it is installed by this user), but the /run/current-system
has no share/emacs at all. I do not know why.
While I got further, it is still somewhat confused as invoking
guix-all-available-packages results in
error in process sentinel: Text is read-only
No prompt found!
> --
> Alex
Adam Pribyl
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 21:04 ` Adam Pribyl
@ 2014-11-22 21:11 ` David Thompson
2014-11-22 22:17 ` Ludovic Courtès
2014-11-26 20:14 ` Alex Kost
1 sibling, 1 reply; 22+ messages in thread
From: David Thompson @ 2014-11-22 21:11 UTC (permalink / raw)
To: Adam Pribyl; +Cc: guix-devel
Adam Pribyl <pribyl@lowlevel.cz> writes:
> (add-to-list 'load-path
> "/gnu/store/ysh4fvnxr0p8xrphcikivpafgvf6g18m-guix-0.8/share/emacs/site-lisp/")
> (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
> (require 'geiser-install)
> (require 'guix-init)
>
> Reason for the /gnu/store path is, that guix.el is a part of guix and I
> did not found it in any profile. I've added my profile path, where the
> geiser is (as it is installed by this user), but the /run/current-system
> has no share/emacs at all. I do not know why.
>
> While I got further, it is still somewhat confused as invoking
> guix-all-available-packages results in
> error in process sentinel: Text is read-only
> No prompt found!
I am experiencing the exact same issue. If you check *Guix REPL*,
you'll see that compiling 'guix-main.scm' fails for some reason. Not
sure why. I gave up on it for now.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 21:11 ` David Thompson
@ 2014-11-22 22:17 ` Ludovic Courtès
2014-11-23 7:01 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-11-22 22:17 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
David Thompson <dthompson2@worcester.edu> skribis:
> I am experiencing the exact same issue. If you check *Guix REPL*,
> you'll see that compiling 'guix-main.scm' fails for some reason. Not
> sure why. I gave up on it for now.
Can you try ,bt and ,error in there?
Most likely, either Geiser’s or Guix’s Scheme modules are not in the
search path when the REPL is started. I had to fiddle with
‘geiser-scheme-dir’ and ‘geiser-guile-load-path’.
Ludo’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 22:17 ` Ludovic Courtès
@ 2014-11-23 7:01 ` Alex Kost
2014-11-24 20:42 ` Ludovic Courtès
0 siblings, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-11-23 7:01 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2014-11-23 01:17 +0300) wrote:
> David Thompson <dthompson2@worcester.edu> skribis:
>
>> I am experiencing the exact same issue. If you check *Guix REPL*,
>> you'll see that compiling 'guix-main.scm' fails for some reason. Not
>> sure why. I gave up on it for now.
>
> Can you try ,bt and ,error in there?
IIUC the REPL is dead, so what can be done is sending the full contents
of *Guix REPL* buffer here so we could look at it.
> Most likely, either Geiser’s or Guix’s Scheme modules are not in the
> search path when the REPL is started. I had to fiddle with
> ‘geiser-scheme-dir’ and ‘geiser-guile-load-path’.
No need to fiddle with ‘geiser-scheme-dir’: it should be set properly if
you have ‘(require 'geiser-install)’ in your emacs config.
Also you made a commit for ‘geiser-guile-load-path’ (a1ca1b7) after the
release, so fiddling with this var will not take any effect.
David wrote on #guix that he has "~/.guile" file with some additional
settings. AFAICT it is loaded only if ‘geiser-guile-load-init-file-p’
was set to a non-nil value.
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-23 7:01 ` Alex Kost
@ 2014-11-24 20:42 ` Ludovic Courtès
2014-11-25 13:58 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-11-24 20:42 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
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.
It would be nice if guix.el somehow had that works-out-of-the-box
property when installing Emacs extensions. :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-24 20:42 ` Ludovic Courtès
@ 2014-11-25 13:58 ` Alex Kost
2014-11-26 16:23 ` Ludovic Courtès
0 siblings, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-11-25 13:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- 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
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-25 13:58 ` Alex Kost
@ 2014-11-26 16:23 ` Ludovic Courtès
2014-11-26 20:38 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-11-26 16:23 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> 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);
‘FOO-autoloads.el’ is the most common convention, right?
> - 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.
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 …" 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’t work because it’s called from
$top_builddir.
Actually, since it’s going to be used in most packages, what about
adding an ‘install-autoloads’ procedure in (guix build emacs-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’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-26 16:23 ` Ludovic Courtès
@ 2014-11-26 20:38 ` Alex Kost
2014-11-26 22:41 ` Ludovic Courtès
0 siblings, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-11-26 20:38 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2014-11-26 19:23 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> 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);
>
> ‘FOO-autoloads.el’ is the most common convention, right?
I think there is no any convention on this, but emacs package system
generates “foo-autoloads.el” indeed.
>> - 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.
>
> 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 …" 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’t work because it’s called from
> $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’s going to be used in most packages, what about
> adding an ‘install-autoloads’ procedure in (guix build emacs-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?
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-26 20:38 ` Alex Kost
@ 2014-11-26 22:41 ` Ludovic Courtès
2014-12-01 12:20 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-11-26 22:41 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Ludovic Courtès (2014-11-26 19:23 +0300) wrote:
[...]
>>> + (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’t work because it’s called from
>> $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.
Oh indeed, I misunderstood the code above, sorry.
>> Actually, since it’s going to be used in most packages, what about
>> adding an ‘install-autoloads’ procedure in (guix build emacs-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,
(define %standard-emacs-phases
(alist-cons-after
'install 'post-install
(lambda* (#:key outputs #:allow-other-keys)
(install-autoloads (assoc-ref outputs "out")))
%standard-phases))
> 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?
Sure!
Thank you,
Ludo’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-26 22:41 ` Ludovic Courtès
@ 2014-12-01 12:20 ` Alex Kost
2014-12-01 12:49 ` Ludovic Courtès
0 siblings, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-12-01 12:20 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2014-11-27 01:41 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
[...]
>>> Actually, since it’s going to be used in most packages, what about
>>> adding an ‘install-autoloads’ procedure in (guix build emacs-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,
>
> (define %standard-emacs-phases
> (alist-cons-after
> 'install 'post-install
> (lambda* (#:key outputs #:allow-other-keys)
> (install-autoloads (assoc-ref outputs "out")))
> %standard-phases))
Sorry, I didn't get how it would work. I realized that I don't
understand how there could be a generalized ‘install-autoloads’
procedure as it should do different things for different packages.
>> 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?
>
> Sure!
Thanks, I have created "wip-emacs-packages" branch: the elisp code is
ready, so now I'm going to walk through existing emacs packages in order
to add “…-autoloads.el” to each one.
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-12-01 12:20 ` Alex Kost
@ 2014-12-01 12:49 ` Ludovic Courtès
2014-12-02 7:46 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-12-01 12:49 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Ludovic Courtès (2014-11-27 01:41 +0300) wrote:
[...]
>>> The problem is that I don't understand what these %standard-emacs-phases
>>> should be,
>>
>> (define %standard-emacs-phases
>> (alist-cons-after
>> 'install 'post-install
>> (lambda* (#:key outputs #:allow-other-keys)
>> (install-autoloads (assoc-ref outputs "out")))
>> %standard-phases))
>
> Sorry, I didn't get how it would work. I realized that I don't
> understand how there could be a generalized ‘install-autoloads’
> procedure as it should do different things for different packages.
Arf, yes, that’s a good point. Perhaps I just overlooked that.
>>> 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?
>>
>> Sure!
>
> Thanks, I have created "wip-emacs-packages" branch: the elisp code is
> ready, so now I'm going to walk through existing emacs packages in order
> to add “…-autoloads.el” to each one.
I just browsed it, and it looks good so far.
I was just thinking: if we want to take over the Emacs world, we need an
ELPA importer for ‘guix import’. (In case you were wondering what to do
next. ;-))
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-12-01 12:49 ` Ludovic Courtès
@ 2014-12-02 7:46 ` Alex Kost
2014-12-02 8:39 ` Ludovic Courtès
0 siblings, 1 reply; 22+ messages in thread
From: Alex Kost @ 2014-12-02 7:46 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2014-12-01 15:49 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
[...]
>> Thanks, I have created "wip-emacs-packages" branch: the elisp code is
>> ready, so now I'm going to walk through existing emacs packages in order
>> to add “…-autoloads.el” to each one.
>
> I just browsed it, and it looks good so far.
OK, I think I finished it. I tried to describe the new feature in the
manual. Should it be improved somehow? Also I think it would be better
to squash all those “gnu: emacs: Add "...-autoloads.el".” into a single
commit. WDYT? And after that I believe all that may go to master.
> I was just thinking: if we want to take over the Emacs world, we need an
> ELPA importer for ‘guix import’. (In case you were wondering what to do
> next. ;-))
Sorry, I'm not interested in it :-(
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-12-02 7:46 ` Alex Kost
@ 2014-12-02 8:39 ` Ludovic Courtès
2014-12-02 19:13 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2014-12-02 8:39 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> Ludovic Courtès (2014-12-01 15:49 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>
> [...]
>>> Thanks, I have created "wip-emacs-packages" branch: the elisp code is
>>> ready, so now I'm going to walk through existing emacs packages in order
>>> to add “…-autoloads.el” to each one.
>>
>> I just browsed it, and it looks good so far.
>
> OK, I think I finished it. I tried to describe the new feature in the
> manual. Should it be improved somehow?
It looks good to me, nothing to add.
> Also I think it would be better to squash all those “gnu: emacs: Add
> "...-autoloads.el".” into a single commit. WDYT?
Either way is fine with me; do as seems best to you.
> And after that I believe all that may go to master.
Agreed.
>> I was just thinking: if we want to take over the Emacs world, we need an
>> ELPA importer for ‘guix import’. (In case you were wondering what to do
>> next. ;-))
>
> Sorry, I'm not interested in it :-(
No problem, maybe someone else, who knows? :-)
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-12-02 8:39 ` Ludovic Courtès
@ 2014-12-02 19:13 ` Alex Kost
0 siblings, 0 replies; 22+ messages in thread
From: Alex Kost @ 2014-12-02 19:13 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2014-12-02 11:39 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2014-12-01 15:49 +0300) wrote:
>>
>>> Alex Kost <alezost@gmail.com> skribis:
>>
>> [...]
>>>> Thanks, I have created "wip-emacs-packages" branch: the elisp code is
>>>> ready, so now I'm going to walk through existing emacs packages in order
>>>> to add “…-autoloads.el” to each one.
>>>
>>> I just browsed it, and it looks good so far.
>>
>> OK, I think I finished it. I tried to describe the new feature in the
>> manual. Should it be improved somehow?
>
> It looks good to me, nothing to add.
>
>> Also I think it would be better to squash all those “gnu: emacs: Add
>> "...-autoloads.el".” into a single commit. WDYT?
>
> Either way is fine with me; do as seems best to you.
OK, I squashed them up; it looks cleaner for me this way.
>> And after that I believe all that may go to master.
>
> Agreed.
Thanks, done.
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-11-22 21:04 ` Adam Pribyl
2014-11-22 21:11 ` David Thompson
@ 2014-11-26 20:14 ` Alex Kost
1 sibling, 0 replies; 22+ messages in thread
From: Alex Kost @ 2014-11-26 20:14 UTC (permalink / raw)
To: guix-devel
Adam Pribyl (2014-11-23 00:04 +0300) wrote:
> On Sat, 22 Nov 2014, Alex Kost wrote:
>
>> Adam Pribyl (2014-11-22 01:28 +0300) wrote:
>>
>>> I have folloed the instruction in
>>> http://www.gnu.org/software/guix/manual/guix.html#Emacs-Interface
>>> to get the emacs interface for guix, but there is something missing
>>> probably.
>>>
>>> Installation of emacs and geiser was OK, I changed the path to guix.el
>>> (there is no /usr/share/ in my guix installation, I had to find guix.el
>>> in the /gnu/store), after that I can start emacs and "M-x guix-..." but
>>> every action says "Cannot open load file: no such file or directory
>>> geiser-mode".
>>
>> If you mean you did (add-to-list 'load-path "/gnu/store/..."), then it's
>> definitely not right.
>>
>>> There should probably be also the geiser path in the emacs init file or
>>> something?
>>
>> I assume you use a Guix (or GNU or whatever it should be called)
>> system. I must admit I have not tried it yet, and all I know about
>> setting "guix.el" there I learnt from a chat with davexunit on #guix
>> today.
>>
>> So I think the following should be added to your emacs config:
>>
>> - Add dirs with "guix.el" and "geiser" to load-path (I'm absolutely
>> not sure about the correctness of the paths, so double check please):
>>
>> (add-to-list 'load-path "/run/current-system/profile/share/emacs/site-lisp/")
>> (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
>>
>> - Initial setup of geiser:
>>
>> (require 'geiser-install)
>>
>> - Initial setup of guix:
>>
>> (require 'guix-init)
>
> Right, I am testing it under GNU system (USB installed image with guix
> 0.8). Thanks for the point regarding geiser. This is now my ~/.emacs
>
> (add-to-list 'load-path
> "/gnu/store/ysh4fvnxr0p8xrphcikivpafgvf6g18m-guix-0.8/share/emacs/site-lisp/")
> (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
> (require 'geiser-install)
> (require 'guix-init)
>
> Reason for the /gnu/store path is, that guix.el is a part of guix and I
> did not found it in any profile. I've added my profile path, where the
> geiser is (as it is installed by this user), but the /run/current-system
> has no share/emacs at all. I do not know why.
Did you check the right path? It's
"/run/current-system/profile/share/emacs...", not
"/run/current-system/share/emacs/..."
> While I got further, it is still somewhat confused as invoking
> guix-all-available-packages results in error in process sentinel: Text
> is read-only
> No prompt found!
Thanks Adam and David for reporting. You encouraged me to install the
system (at last). So the problem was that a default directory with guix
scheme files was not added to the %load-path (it is fixed with commit
cbbc877). As a workaround you may perform "guix pull" – after that the
REPL should start without errors.
So to recap, to make "guix.el" work in the current system one should do
the following:
1. "guix pull" to populate "~/.config/guix/latest" (this step will not
be required for the future releases)
2. Install geiser: "guix package -i geiser"
3. Setup geiser (hopefully this step will not be required soon)
Put in your emacs config:
(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
(require 'geiser-install)
4. Setup "guix.el". Put in your emacs config:
(add-to-list 'load-path "<path-to-a-directory-with-guix.el>")
(require 'guix-init)
I appreciate if someone confirm that the above works (or doesn't work :-)).
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
@ 2014-12-01 17:15 Federico Beffa
2014-12-02 7:52 ` Alex Kost
0 siblings, 1 reply; 22+ messages in thread
From: Federico Beffa @ 2014-12-01 17:15 UTC (permalink / raw)
To: ludo, Guix-devel, Alex Kost
ludo@gnu.org (Ludovic Courtès) writes:
> Alex Kost <alezost@gmail.com> skribis:
>
>> Ludovic Courtès (2014-11-27 01:41 +0300) wrote:
>
> [...]
>
>>>> The problem is that I don't understand what these %standard-emacs-phases
>>>> should be,
>>>
>>> (define %standard-emacs-phases
>>> (alist-cons-after
>>> 'install 'post-install
>>> (lambda* (#:key outputs #:allow-other-keys)
>>> (install-autoloads (assoc-ref outputs "out")))
>>> %standard-phases))
>>
>> Sorry, I didn't get how it would work. I realized that I don't
>> understand how there could be a generalized ‘install-autoloads’
>> procedure as it should do different things for different packages.
>
AFAIU the initialization of each package is already defined inside each
package by the author. The way emacs's packaging infrastructure works
goes along the lines (see (elisp) Packaging Basics):
* At installation:
- Search every Lisp file in the content directory for autoload magic
comments (*note Autoload::). These autoload definitions are saved
to a file named `NAME-autoloads.el' in the package's content
directory.
- Byte-compiles every Lisp file in the package.
- Add the package's content directory to `load-path', and evaluates
the autoload definitions in `NAME-autoloads.el'.
* At startup:
- Emacs scans for a predefined directory for NAME-autoloads.el files
and evaluates them ('package-initialize' function). We could maybe
exploit 'after-init-hook' or something something similar.
Regards,
Fede
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Howto run guix.el correctly?
2014-12-01 17:15 Federico Beffa
@ 2014-12-02 7:52 ` Alex Kost
0 siblings, 0 replies; 22+ messages in thread
From: Alex Kost @ 2014-12-02 7:52 UTC (permalink / raw)
To: Federico Beffa; +Cc: Guix-devel
Federico Beffa (2014-12-01 20:15 +0300) wrote:
> AFAIU the initialization of each package is already defined inside each
> package by the author. The way emacs's packaging infrastructure works
> goes along the lines (see (elisp) Packaging Basics):
>
> * At installation:
>
> - Search every Lisp file in the content directory for autoload magic
> comments (*note Autoload::). These autoload definitions are saved
> to a file named `NAME-autoloads.el' in the package's content
> directory.
>
> - Byte-compiles every Lisp file in the package.
>
> - Add the package's content directory to `load-path', and evaluates
> the autoload definitions in `NAME-autoloads.el'.
>
> * At startup:
>
> - Emacs scans for a predefined directory for NAME-autoloads.el files
> and evaluates them ('package-initialize' function). We could maybe
> exploit 'after-init-hook' or something something similar.
Thanks, I know all that stuff.
(I'm sorry if it was sounded rude)
--
Alex
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2014-12-02 19:14 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).