doc: Add a REPL example.

* doc/contributing.texi (Running Guix Before It Is Installed): Add REPL
  example.
* doc/emacs.texi (Emacs General info): Add @cindex.
This commit is contained in:
Ludovic Courtès 2015-10-26 18:44:18 +01:00
parent 5e1c936712
commit 9685661324
2 changed files with 26 additions and 0 deletions

View File

@ -86,6 +86,30 @@ Similarly, for a Guile session using the Guix modules:
@example
$ ./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-system))'
;;; ("x86_64-linux")
@end example
@noindent
@cindex REPL
@cindex read-eval-print loop
@dots{} and for a REPL (@pxref{Using Guile Interactively,,, guile, Guile
Reference Manual}):
@example
$ ./pre-inst-env guile
scheme@@(guile-user)> ,use(guix)
scheme@@(guile-user)> ,use(gnu)
scheme@@(guile-user)> (define snakes
(fold-packages
(lambda (package lst)
(if (string-prefix? "python"
(package-name package))
(cons package lst)
lst))
'()))
scheme@@(guile-user)> (length snakes)
$1 = 361
@end example
The @command{pre-inst-env} script sets up all the environment variables

View File

@ -227,6 +227,8 @@ prefix argument is used. This has the same meaning as @code{--manifest}
option (@pxref{Invoking guix package}).
@item C-c C-z
@cindex REPL
@cindex read-eval-print loop
Go to the Guix REPL (@pxref{The REPL,,, geiser, Geiser User Manual}).
@item h