guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs load path


From: Alex Kost
Subject: Re: Emacs load path
Date: Sat, 02 Jan 2016 17:13:44 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Federico Beffa (2016-01-01 19:53 +0300) wrote:

> On Fri, Jan 1, 2016 at 5:28 PM, Alex Kost <address@hidden> wrote:
>> Ludovic Courtès (2016-01-01 18:22 +0300) wrote:
>>
>>>> then we should definitely add code in a similar way to instruct emacs
>>>> to look in the right places (".../guix.d") for our emacs packages out
>>>> of the box.  As Dmitry rightfully points out, having emacs packages
>>>> which do not work out of the box is just a bug.
>>>
>>> Yeah.  Alex, any idea how to add the guix.d subdirectories to the search
>>> path without duplicating all of guix.el in the ‘emacs’ package?
>>
>> Yeah, no need to duplicate all of the guix elisp files.  Only
>> "guix-emacs.el" (and its dependencies: "guix-profiles.el" and
>> "guix-config.el") is needed.  And instead of (require 'guix-init) the
>> following code should be used to "activate" our .guix.d directories:
>
> there's no 'guix-config.el', but only 'guix-config.el.in'. It would be
> great if you could provide a working patch.

Hm, OK, so your "proof of concept patch" will have the same problem.
Could you please answer
<http://lists.gnu.org/archive/html/guix-devel/2016-01/msg00021.html>, as
I still don't understand how your suggestion can help Emacs to find
packages in "guix.d" dirs of user profile.  To make this work out of the
box, Emacs should load some additional code (see below), but what you
suggest is just adding guix-...el files ("guix-emacs.el" now should be
enough) to Emacs site-lisp directory.

Returning to 'guix-config' problem, we can make a "soft" dependency on
'guix-profiles' (see the attached patch), so the only file needed for
finding emacs packages in "guix.d" will be "guix-emacs.el".  And the
code that should be loaded by Emacs to find guix emacs packages will be:

(when (require 'guix-emacs nil t)
  (add-to-list 'load-path (guix-emacs-directory))
  (guix-emacs-load-autoloads))

Attachment: 0001-emacs-Make-guix-emacs.el-independent.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]