guix-devel
[Top][All Lists]
Advanced

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

Emacs load path (was: Re: Multiple versions)


From: Federico Beffa
Subject: Emacs load path (was: Re: Multiple versions)
Date: Sun, 27 Dec 2015 23:16:46 +0100

Alex Kost <address@hidden> writes:

> Dmitry Bogatov (2015-12-27 19:47 +0300) wrote:
>
>> * Alex Kost <address@hidden> [2015-12-27 17:11:20+0300]
>>> Dmitry Bogatov (2015-12-27 02:02 +0300) wrote:
>>>
>>> >   * By default, ~/.guix-profile/share/emacs/site-lisp/guix.d is not in
>>> >     load-path. `emacs-no-x` exports no variables. So, if I install
>>> >     some emacs library, like `emacs-f`, evaluating (require 'f) in emacs
>>> >     fails. It is... unexpected. Is it intended behaviour?
>>>
>>> Yes, Federico Beffa (the author of emacs-build-system) explained it here:
>>> <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00398.html>
>>>
>>> You either have to add guix.d directory manually or you can configure
>>> emacs interface that comes with Guix, which means (require 'guix-init)
>>> more or less.  See (info "(guix) Emacs Initial Setup") for details.
>>
>> Read this email. It explain existance of guix.d subdirectory, but why
>> can't we force emacs to execute following pseudo-code at start:
>>
>> (for dir in "${HOME}.guix-profile/share/emacs/site-lisp/guix.d"
>>   (push dir load-path))
>
> This is more or less what (require 'guix-init) does (among other
> things).  And it works out of the box on GuixSD.

If you install guix in the default prefix (/usr/local) you should find a
file called 'guix.el' in /usr/local/share/emacs/site-lisp/.  With that
you can include the following commands in your .emacs file and you
should be all set:

1. (setq load-path (append '("/usr/local/share/emacs/site-lisp/") load-path))
2. (require 'guix-init nil t)

On some host distros step 1. may not even be needed.

As Alex says, 'guix.el' does much more than adding the various
directories needed for proper operation of Guix's "emacs-..." packages. Take a
look at the manual.

Regards,
Fede



reply via email to

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