From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Emacs load path (was: Re: Multiple versions) Date: Sun, 27 Dec 2015 23:16:46 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aDJcO-0005dA-Ne for guix-devel@gnu.org; Sun, 27 Dec 2015 17:16:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aDJcN-0006vt-O3 for guix-devel@gnu.org; Sun, 27 Dec 2015 17:16:48 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: KAction@gnu.org Cc: Guix-devel , Alex Kost Alex Kost writes: > Dmitry Bogatov (2015-12-27 19:47 +0300) wrote: > >> * Alex Kost [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: >>> >>> >>> 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