unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] doc emacs: Improve documentation on initial setup.
@ 2015-06-07 18:59 Alex Kost
  2015-06-07 19:42 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Kost @ 2015-06-07 18:59 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

As reported today on #guix
<https://gnunet.org/bot/log/guix/2015-06-07#T672445>, it is not obvious
how to use "guix.el" when a binary installation was used.  So this patch
is intended to improve the documentation on that subject.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-emacs-Improve-documentation-on-initial-setup.patch --]
[-- Type: text/x-diff, Size: 3131 bytes --]

From f14f533935169be164a94ecdcfeeecf6690bc07f Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Sun, 7 Jun 2015 21:43:58 +0300
Subject: [PATCH] doc emacs: Improve documentation on initial setup.

Reported by ngz on #guix.

* doc/emacs.texi (Emacs Initial Setup): Describe how to configure
  "guix.el" in the case of binary installation and when Guix is not
  installed.
---
 doc/emacs.texi | 44 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 35 insertions(+), 9 deletions(-)

diff --git a/doc/emacs.texi b/doc/emacs.texi
index 00cd5c1..0a94b95 100644
--- a/doc/emacs.texi
+++ b/doc/emacs.texi
@@ -45,23 +45,49 @@ used for interacting with the Guile process.
 
 @end itemize
 
-When it is done, add the following into your init file (@pxref{Init
-File,,, emacs, The GNU Emacs Manual}):
+When it is done ``guix.el'' may be configured by requiring a special
+@code{guix-init} file---i.e., by adding the following code into your
+init file (@pxref{Init File,,, emacs, The GNU Emacs Manual}):
 
 @example
+(add-to-list 'load-path "/path/to/directory-with-guix.el")
 (require 'guix-init nil t)
 @end example
 
-However there is a chance that @code{load-path} of your Emacs does not
-contain a directory with ``guix.el'' (usually it is
-@file{/usr/share/emacs/site-lisp/}).  In that case you need to add it
-before requiring (@pxref{Lisp Libraries,,, emacs, The GNU Emacs
-Manual}):
+So the only thing you need to figure out is where the directory with
+elisp files for Guix is placed.  It depends on how you installed Guix:
+
+@itemize
+@item
+If it was installed by a package manager of your distribution or by a
+usual @code{./configure && make && make install} command sequence, then
+elisp files are placed in a standard directory with Emacs packages
+(usually it is @file{/usr/share/emacs/site-lisp/}), which is already in
+@code{load-path}, so there is no need to add that directory there.
+
+@item
+If you used a binary installation method (@pxref{Binary Installation}),
+then Guix is installed somewhere in the store, so the elisp files are
+placed in @file{/gnu/store/@dots{}-guix-0.8.2/share/emacs/site-lisp/} or
+alike.  However it is not recommended to use a direct store directory,
+instead you can install Guix using Guix itself with @command{guix
+package -i guix} command (@pxref{Invoking guix package}) and add
+@file{~/.guix-profile/share/emacs/site-lisp/} directory to
+@code{load-path} variable.
+
+@item
+If you did not install Guix at all and prefer a hacking way
+(@pxref{Running Guix Before It Is Installed}), along with augmenting
+@code{load-path} you need to set @code{guix-load-path} variable to the
+same directory, so your final configuration will look like this:
 
 @example
-(add-to-list 'load-path "/path/to/directory-with-guix.el")
-(require 'guix-init)
+(let ((dir "/path/to/your-guix-git-tree/emacs"))
+  (add-to-list 'load-path dir)
+  (setq guix-load-path dir))
+(require 'guix-init nil t)
 @end example
+@end itemize
 
 By default, along with autoloading (@pxref{Autoload,,, elisp, The GNU
 Emacs Lisp Reference Manual}) the main interactive commands for
-- 
2.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc emacs: Improve documentation on initial setup.
  2015-06-07 18:59 [PATCH] doc emacs: Improve documentation on initial setup Alex Kost
@ 2015-06-07 19:42 ` Ludovic Courtès
  2015-06-08  8:53   ` Alex Kost
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-06-07 19:42 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> From f14f533935169be164a94ecdcfeeecf6690bc07f Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Sun, 7 Jun 2015 21:43:58 +0300
> Subject: [PATCH] doc emacs: Improve documentation on initial setup.
>
> Reported by ngz on #guix.
>
> * doc/emacs.texi (Emacs Initial Setup): Describe how to configure
>   "guix.el" in the case of binary installation and when Guix is not
>   installed.

Good idea!

> +alike.  However it is not recommended to use a direct store directory,

... recommended to refer directly to a store directory.  Instead, you
can ...

OK with this change!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] doc emacs: Improve documentation on initial setup.
  2015-06-07 19:42 ` Ludovic Courtès
@ 2015-06-08  8:53   ` Alex Kost
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Kost @ 2015-06-08  8:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès (2015-06-07 22:42 +0300) wrote:

> Alex Kost <alezost@gmail.com> skribis:
>
>> From f14f533935169be164a94ecdcfeeecf6690bc07f Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Sun, 7 Jun 2015 21:43:58 +0300
>> Subject: [PATCH] doc emacs: Improve documentation on initial setup.
>>
>> Reported by ngz on #guix.
>>
>> * doc/emacs.texi (Emacs Initial Setup): Describe how to configure
>>   "guix.el" in the case of binary installation and when Guix is not
>>   installed.
>
> Good idea!
>
>> +alike.  However it is not recommended to use a direct store directory,
>
> ... recommended to refer directly to a store directory.  Instead, you
> can ...
>
> OK with this change!

Thank you, changed and pushed.

-- 
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-08  8:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 18:59 [PATCH] doc emacs: Improve documentation on initial setup Alex Kost
2015-06-07 19:42 ` Ludovic Courtès
2015-06-08  8:53   ` Alex Kost

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).