From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Emacs load path Date: Fri, 01 Jan 2016 01:47:48 +0300 Message-ID: <8737ui2q23.fsf@gmail.com> References: <87io3frjcd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEm0f-0000dc-EV for guix-devel@gnu.org; Thu, 31 Dec 2015 17:47:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEm0e-0008SI-Cz for guix-devel@gnu.org; Thu, 31 Dec 2015 17:47:53 -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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel , KAction@gnu.org, Federico Beffa --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2015-12-30 19:29 +0300) wrote: > Federico Beffa skribis: > >> 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-p= ath)) >> 2. (require 'guix-init nil t) >> >> On some host distros step 1. may not even be needed. > > I don=E2=80=99t see how to make that happen automatically on foreign dist= ros. > Any ideas? No ideas. > We still have the option of making it more prominent in the > documentation, for example by mentioning specifically Emacs under > . I also think we should mention Emacs packages in the manual. What about the attached patch? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-doc-Describe-how-to-configure-Emacs-packages.patch Content-Transfer-Encoding: quoted-printable >From 938e45e104b55b32d6c2423543c18efc7dc9365a Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Fri, 1 Jan 2016 01:37:45 +0300 Subject: [PATCH] doc: Describe how to configure Emacs packages. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Suggested by Ludovic Court=C3=A8s . * doc/guix.texi (Application Setup)[Emacs Packages]: New subsection. --- doc/guix.texi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index c45f1c8..a8cdac8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1035,6 +1035,31 @@ for Chinese languages: guix package -i font-adobe-source-han-sans:cn @end example =20 +@subsection Emacs Packages + +When you install Emacs packages with Guix, the elisp files may be placed +either in @file{$HOME/.guix-profile/share/emacs/site-lisp/} or in +sub-directories of +@file{$HOME/.guix-profile/share/emacs/site-lisp/guix.d/}. The latter +directory exists because potentially there may exist thousands of Emacs +packages and storing all their files in a single directory may be not +reliable (because of name conflicts). So we think using a separate +directory for each package is a good idea. It is very similar to how +Emacs package system organizes the file structure (@pxref{Package +Files,,, emacs, The GNU Emacs Manual}). + +So, to let Emacs ``know'' where these package are placed (i.e., to add +required directories to @code{load-path} and to load +@file{@dots{}-autoloads.el} files), you can set up the elisp code that +comes with Guix. It should look like this: + +@example +(add-to-list 'load-path "/path/to/guix-emacs-directory") +(require 'guix-init nil t) +@end example + +@xref{Emacs Initial Setup}, for more information. + @c TODO What else? =20 @c ********************************************************************* --=20 2.6.3 --=-=-=--