summaryrefslogtreecommitdiff
path: root/doc/contributing.texi
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-26 18:44:18 +0100
committerLudovic Courtès <ludo@gnu.org>2015-10-27 00:01:20 +0100
commit96856613249ccef0bfce16edd945a841d1b661f7 (patch)
treeaa7054114f83f9be69c7b493c3bcb5971d720054 /doc/contributing.texi
parent5e1c936712d824e7ccbb3cbb8ac7ffa375237469 (diff)
downloadpatches-96856613249ccef0bfce16edd945a841d1b661f7.tar
patches-96856613249ccef0bfce16edd945a841d1b661f7.tar.gz
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.
Diffstat (limited to 'doc/contributing.texi')
-rw-r--r--doc/contributing.texi24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 245ce9b1c4..d80c0d5fdf 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -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