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)

>From a63b787b545d5b9fcc2a2c76e9e102144fafa0e8 Mon Sep 17 00:00:00 2001
From: Alex Kost <[email protected]>
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 <[email protected]>
+;;; Copyright © 2016 David Thompson <[email protected]>
+;;; Copyright © 2016 Alex Kost <[email protected]>
 ;;;
 ;;; 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

Reply via email to