* [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir'.
@ 2015-06-21 12:32 宋文武
2015-06-21 13:21 ` 宋文武
2015-06-22 19:51 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: 宋文武 @ 2015-06-21 12:32 UTC (permalink / raw)
To: guix-devel
* gnu/packages/emacs.scm (geiser)[arguments]: Symlink Guile modules
to the right 'guilesitedir' in the 'post-install' phase.
---
gnu/packages/emacs.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 2502f29..337d00d 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -196,10 +196,17 @@ editor (without an X toolkit)" )
'(#: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")))
+ (let* ((out (assoc-ref outputs "out"))
+ (guilesitedir (string-append
+ out "/share/guile/site/2.0")))
+ (symlink "geiser-install.el"
+ (string-append out
+ "/share/emacs/site-lisp/"
+ "geiser-autoloads.el"))
+ ;; Symlink Guile modules to the right 'guilesitedir'.
+ (mkdir-p guilesitedir)
+ (symlink (string-append out "/share/geiser/guile/geiser")
+ (string-append guilesitedir "/geiser"))))
%standard-phases)))
(inputs `(("guile" ,guile-2.0)
("emacs" ,emacs-no-x)))
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir'.
2015-06-21 12:32 [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir' 宋文武
@ 2015-06-21 13:21 ` 宋文武
2015-06-21 14:05 ` Alex Kost
2015-06-22 19:51 ` Ludovic Courtès
1 sibling, 1 reply; 5+ messages in thread
From: 宋文武 @ 2015-06-21 13:21 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
The previous patch was intend to fix a issue that manually spawned Guile
doesn't know the geiser module.
When discuss this issue in IRC with alezost, I suddenly notice that add
a simple '(require 'geiser-install)' to my init.el make it work.
Here is the new patch for '/etc/emacs/site-start.el' (not tested yet!):
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-system-emacs-site-file-Use-geiser-install-to-load-ge.patch --]
[-- Type: text/x-patch, Size: 1301 bytes --]
From d26e6299c9d468ff4a745a7efe9ea4f1a5d7c63a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Sun, 21 Jun 2015 21:09:42 +0800
Subject: [PATCH] system: emacs-site-file: Use 'geiser-install to load geiser.
Suggested by Alex Kost <alezost@gmail.com>.
* gnu/system.scm (emacs-site-file): Use 'geiser-install to load geiser
instead of setting 'geiser-guile-load-path' manually.
---
gnu/system.scm | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 565d6c1..82b7fbc 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -391,12 +391,8 @@ settings for 'guix.el' to work out-of-the-box."
;; Attempt to load guix.el.
(require 'guix-init nil t)
- (when (require 'geiser-guile nil t)
- ;; Make sure Geiser's Scheme modules are in Guile's search
- ;; path.
- (add-to-list
- 'geiser-guile-load-path
- "/run/current-system/profile/share/geiser/guile")))))
+ ;; Attempt to load geiser.
+ (require 'geiser-install nil t))))
(define (emacs-site-directory)
"Return the Emacs site directory, aka. /etc/emacs."
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir'.
2015-06-21 13:21 ` 宋文武
@ 2015-06-21 14:05 ` Alex Kost
0 siblings, 0 replies; 5+ messages in thread
From: Alex Kost @ 2015-06-21 14:05 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
宋文武 (2015-06-21 16:21 +0300) wrote:
> The previous patch was intend to fix a issue that manually spawned Guile
> doesn't know the geiser module.
>
> When discuss this issue in IRC with alezost, I suddenly notice that add
> a simple '(require 'geiser-install)' to my init.el make it work.
>
> Here is the new patch for '/etc/emacs/site-start.el' (not tested yet!):
>
>
> From d26e6299c9d468ff4a745a7efe9ea4f1a5d7c63a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
> Date: Sun, 21 Jun 2015 21:09:42 +0800
> Subject: [PATCH] system: emacs-site-file: Use 'geiser-install to load geiser.
>
> Suggested by Alex Kost <alezost@gmail.com>.
>
> * gnu/system.scm (emacs-site-file): Use 'geiser-install to load geiser
> instead of setting 'geiser-guile-load-path' manually.
> ---
> gnu/system.scm | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/system.scm b/gnu/system.scm
> index 565d6c1..82b7fbc 100644
> --- a/gnu/system.scm
> +++ b/gnu/system.scm
> @@ -391,12 +391,8 @@ settings for 'guix.el' to work out-of-the-box."
> ;; Attempt to load guix.el.
> (require 'guix-init nil t)
>
> - (when (require 'geiser-guile nil t)
> - ;; Make sure Geiser's Scheme modules are in Guile's search
> - ;; path.
> - (add-to-list
> - 'geiser-guile-load-path
> - "/run/current-system/profile/share/geiser/guile")))))
> + ;; Attempt to load geiser.
> + (require 'geiser-install nil t))))
>
> (define (emacs-site-directory)
> "Return the Emacs site directory, aka. /etc/emacs."
I didn't test it but I think it should work, as according to the geiser
manual (info "(geiser) From the source's mouth"), requiring
'geiser-install' is the proper way to set up Geiser (that's why we
symlink "geiser-install.el" by "geiser-autoloads.el" in a geiser package
recipe).
--
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir'.
2015-06-21 12:32 [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir' 宋文武
2015-06-21 13:21 ` 宋文武
@ 2015-06-22 19:51 ` Ludovic Courtès
2015-06-23 6:20 ` 宋文武
1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2015-06-22 19:51 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
宋文武 <iyzsong@gmail.com> skribis:
> * gnu/packages/emacs.scm (geiser)[arguments]: Symlink Guile modules
> to the right 'guilesitedir' in the 'post-install' phase.
宋文武 <iyzsong@gmail.com> skribis:
> The previous patch was intend to fix a issue that manually spawned Guile
> doesn't know the geiser module.
>
> When discuss this issue in IRC with alezost, I suddenly notice that add
> a simple '(require 'geiser-install)' to my init.el make it work.
>
> Here is the new patch for '/etc/emacs/site-start.el' (not tested yet!):
LGTM, but please check with ‘guix system vm’ or similar that it works as
expected.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir'.
2015-06-22 19:51 ` Ludovic Courtès
@ 2015-06-23 6:20 ` 宋文武
0 siblings, 0 replies; 5+ messages in thread
From: 宋文武 @ 2015-06-23 6:20 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès <ludo@gnu.org> writes:
> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/emacs.scm (geiser)[arguments]: Symlink Guile modules
>> to the right 'guilesitedir' in the 'post-install' phase.
>
> 宋文武 <iyzsong@gmail.com> skribis:
>
>> The previous patch was intend to fix a issue that manually spawned Guile
>> doesn't know the geiser module.
>>
>> When discuss this issue in IRC with alezost, I suddenly notice that add
>> a simple '(require 'geiser-install)' to my init.el make it work.
>>
>> Here is the new patch for '/etc/emacs/site-start.el' (not tested yet!):
>
> LGTM, but please check with ‘guix system vm’ or similar that it works as
> expected.
Done, thanks for review!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-23 6:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-21 12:32 [PATCH] gnu: geiser: Symlink Guile modules to the right 'guilesitedir' 宋文武
2015-06-21 13:21 ` 宋文武
2015-06-21 14:05 ` Alex Kost
2015-06-22 19:51 ` Ludovic Courtès
2015-06-23 6:20 ` 宋文武
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).