* [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp".
@ 2016-06-20 13:10 Alex Kost
2016-06-21 19:29 ` Ricardo Wurmus
0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2016-06-20 13:10 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
Ricardo found a problem while working on some emacs package that
requires EMMS: the elisp file(s) of this package is(are) not compiled.
This happens because currently emacs-build-system adds only
"share/emacs/site-lisp/guix.d/<package>" to emacs load-path when it
compiles elisp files, but some emacs packages (for example, emms) put
their files in "share/emacs/site-lisp", so this directory should also be
added. The attached patch will do it.
(I added a copyright line for David because he forgot to do it in commit 578b96af69057883a2a49a34dd6fe261cb2f4e5c)
[-- Attachment #2: 0001-build-emacs-Search-elisp-files-in-share-emacs-site-l.patch --]
[-- Type: text/x-patch, Size: 1755 bytes --]
From a63b787b545d5b9fcc2a2c76e9e102144fafa0e8 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Mon, 20 Jun 2016 15:49:04 +0300
Subject: [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp".
* guix/build/emacs-build-system.scm (emacs-inputs-el-directories):
Add ".../share/emacs/site-lisp" directory to the returned result as
elisp files can also be placed there.
---
guix/build/emacs-build-system.scm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index ab97001..44e8b0d 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -1,5 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2016 David Thompson <davet@gnu.org>
+;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -152,10 +154,11 @@ store in '.el' files."
(define (emacs-inputs-el-directories dirs)
"Build the list of Emacs Lisp directories from the Emacs package directory
DIRS."
- (map (lambda (d)
- (string-append d %install-suffix "/"
- (store-directory->elpa-name-version d)))
- dirs))
+ (append-map (lambda (d)
+ (list (string-append d "/share/emacs/site-lisp")
+ (string-append d %install-suffix "/"
+ (store-directory->elpa-name-version d))))
+ dirs))
(define (package-name-version->elpa-name-version name-ver)
"Convert the Guix package NAME-VER to the corresponding ELPA name-version
--
2.8.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp".
2016-06-20 13:10 [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp" Alex Kost
@ 2016-06-21 19:29 ` Ricardo Wurmus
2016-06-21 20:41 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-21 19:29 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> writes:
> Ricardo found a problem while working on some emacs package that
> requires EMMS: the elisp file(s) of this package is(are) not compiled.
>
> This happens because currently emacs-build-system adds only
> "share/emacs/site-lisp/guix.d/<package>" to emacs load-path when it
> compiles elisp files, but some emacs packages (for example, emms) put
> their files in "share/emacs/site-lisp", so this directory should also be
> added. The attached patch will do it.
Thank you for the patch! This looks like the right thing to do.
Should we also (in a later patch) add a way to override or append to the
list of directories, e.g. via the “arguments“ field?
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp".
2016-06-21 19:29 ` Ricardo Wurmus
@ 2016-06-21 20:41 ` Ludovic Courtès
2016-06-22 8:16 ` Alex Kost
2016-06-23 5:30 ` Ricardo Wurmus
0 siblings, 2 replies; 5+ messages in thread
From: Ludovic Courtès @ 2016-06-21 20:41 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel, Alex Kost
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> Alex Kost <alezost@gmail.com> writes:
>
>> Ricardo found a problem while working on some emacs package that
>> requires EMMS: the elisp file(s) of this package is(are) not compiled.
>>
>> This happens because currently emacs-build-system adds only
>> "share/emacs/site-lisp/guix.d/<package>" to emacs load-path when it
>> compiles elisp files, but some emacs packages (for example, emms) put
>> their files in "share/emacs/site-lisp", so this directory should also be
>> added. The attached patch will do it.
>
> Thank you for the patch! This looks like the right thing to do.
+1
> Should we also (in a later patch) add a way to override or append to the
> list of directories, e.g. via the “arguments“ field?
FWIW I’m not convinced this is necessary, but we can always see later.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp".
2016-06-21 20:41 ` Ludovic Courtès
@ 2016-06-22 8:16 ` Alex Kost
2016-06-23 5:30 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Alex Kost @ 2016-06-22 8:16 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-06-21 23:41 +0300) wrote:
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> Ricardo found a problem while working on some emacs package that
>>> requires EMMS: the elisp file(s) of this package is(are) not compiled.
>>>
>>> This happens because currently emacs-build-system adds only
>>> "share/emacs/site-lisp/guix.d/<package>" to emacs load-path when it
>>> compiles elisp files, but some emacs packages (for example, emms) put
>>> their files in "share/emacs/site-lisp", so this directory should also be
>>> added. The attached patch will do it.
>>
>> Thank you for the patch! This looks like the right thing to do.
>
> +1
Pushed, thanks.
>> Should we also (in a later patch) add a way to override or append to the
>> list of directories, e.g. via the “arguments“ field?
>
> FWIW I’m not convinced this is necessary, but we can always see later.
I agree: we can add this feature later if it will be needed. But currently
it is not needed, as all our emacs packages put *.el files either in
"share/emacs/site-lisp" or in "share/emacs/site-lisp/guix.d/<package>".
--
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp".
2016-06-21 20:41 ` Ludovic Courtès
2016-06-22 8:16 ` Alex Kost
@ 2016-06-23 5:30 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2016-06-23 5:30 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, Alex Kost
Ludovic Courtès <ludo@gnu.org> writes:
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> Alex Kost <alezost@gmail.com> writes:
>>
>>> Ricardo found a problem while working on some emacs package that
>>> requires EMMS: the elisp file(s) of this package is(are) not compiled.
>>>
>>> This happens because currently emacs-build-system adds only
>>> "share/emacs/site-lisp/guix.d/<package>" to emacs load-path when it
>>> compiles elisp files, but some emacs packages (for example, emms) put
>>> their files in "share/emacs/site-lisp", so this directory should also be
>>> added. The attached patch will do it.
>>
>> Thank you for the patch! This looks like the right thing to do.
>
> +1
>
>> Should we also (in a later patch) add a way to override or append to the
>> list of directories, e.g. via the “arguments“ field?
>
> FWIW I’m not convinced this is necessary, but we can always see later.
You are probably right. I thought that packages like Lilypond install
their Elisp files elsewhere, but it’s actually “share/emacs/site-lisp”
as expected.
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-23 5:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-20 13:10 [PATCH] build: emacs: Search elisp files in "share/emacs/site-lisp" Alex Kost
2016-06-21 19:29 ` Ricardo Wurmus
2016-06-21 20:41 ` Ludovic Courtès
2016-06-22 8:16 ` Alex Kost
2016-06-23 5:30 ` Ricardo Wurmus
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.