Hello Pierre, Pierre Neidhardt <m...@ambrevar.xyz> writes:
> Maxim Cournoyer <maxim.courno...@gmail.com> writes: > >> Maybe it is just my ignorance about XDG_DATA_DIRS, but, wouldn't it be >> more natural to use Emacs native mean of finding packages, akin to >> Python's PYTHONPATH? Emacs has the EMACSLOADPATH for this; per the >> Emacs manual: > > Well, I'd say it's my ignorance, not yours! > >> I had a working branch implementing this a long time ago; I could try >> reviving it if you have an interested in it. > > This seems to be the right thing to do, I'd say go ahead, I'd be happy > to review / test / send feedback for your patch! I've thought some more about this, and perhaps such a simple change the patch attached could do? It's late and I haven't tried it yet, sorry. Will try it out later. You'll have to rebuild just Emacs and the Emacs packages you use. Various cleanups could be undertaken in both Guix (no longer need the set-emacsloadpath phase in the emacs-build-system) and Emacs-Guix (no need for custom logic looking into ~/.guix-profile) and perhaps other places should this get merged.
>From 809bdcc447557134fbf4278c3b0d4b7d186d190d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.courno...@gmail.com> Date: Sat, 3 Jun 2017 12:56:36 -0700 Subject: [PATCH] gnu: emacs: Locate Elisp libraries via EMACSLOADPATH. * gnu/packages/emacs.scm (emacs): Add a search path specification for EMACSLOADPATH. --- gnu/packages/emacs.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6c6f0e4567..0831dd575a 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -185,6 +185,13 @@ (native-search-paths (list (search-path-specification + (variable "EMACSLOADPATH") + ;; The versioned entries are for Emacs builtin libraries. + (files `(,(string-append "share/emacs/" version "/site-lisp/") + ,(string-append "share/emacs/" version "/lisp/") + "share/emacs/site-lisp/")) + (file-pattern ".*")) ;recursively add any sub directory + (search-path-specification (variable "INFOPATH") (files '("share/info"))))) -- 2.23.0
Maxim -- This is perhaps obsoleted by the above, but feel free to study Here is a branch of the two commits, based off master: https://gitlab.com/Apteryks/guix/tree/guixify-emacs-packages-discovery. Sadly, this is a world rebuilding change, due to having extended the search-path-specification record so that it supported declaring a trailing separator.