add docs for installing CLHS locally

This commit is contained in:
Peter Tillemans 2024-12-03 09:12:46 +01:00
parent 02e69fb344
commit 4775a1f5e2

View file

@ -1168,7 +1168,6 @@ worked on. See the [[https://github.com/joaotavora/breadcrumb][breadcrumb repo]]
#+RESULTS:
: [nil 26432 31533 350342 nil elpaca-process-queues nil nil 899000 nil]
* Writing and Planning
#+BEGIN_SRC emacs-lisp
@ -2304,6 +2303,85 @@ no arguments. In Emacs 23.2 and newer, it takes one argument."
#+RESULTS:
: [nil 26432 28005 611924 nil elpaca-process-queues nil nil 196000 nil]
**** Configure CLHS documentation
Common Lisp Hyperspec is distributed as a package for
#+BEGIN_SRC shell :tangle no
AOC/2024/02> (ql:quickload "clhs")
To load "clhs":
Install 1 Quicklisp release:
clhs
; Fetching #<URL "http://beta.quicklisp.org/archive/clhs/2015-04-07/clhs-0.6.3.tgz">
; 2186.27KB
==================================================
2,238,743 bytes in 0.04 seconds (50845.91KB/sec)
; Loading "clhs"
[package clhs].
("clhs")
#+END_SRC
There is a wizard to help installing it in Emacs:
#+BEGIN_SRC shell :tangle no
AOC/2024/02> (clhs:print-emacs-setup-form)
[ Quicklisp directory: "/home/pti/quicklisp/" (exists)
If the above location is not correct, do:
(setf clhs:*quicklisp-directory* "/path/to/quicklisp/") ]
clhs-use-local.el was not found in your quicklisp directory.
This means you're at step 1 of 2 for configuring Emacs/Slime
to perform lookups/browsing with your local copy of the CLHS.
Please run (clhs:install-clhs-use-local) in the (Common Lisp) REPL.
This will install clhs-use-local.el in your quicklisp directory.
Then, run (clhs:print-emacs-setup-form) again for instructions for step 2.
; No values
AOC/2024/02> (clhs:install-clhs-use-local)
T
AOC/2024/02> (clhs:print-emacs-setup-form)
[ Quicklisp directory: "/home/pti/quicklisp/" (exists)
If the above location is not correct, do:
(setf clhs:*quicklisp-directory* "/path/to/quicklisp/") ]
(clhs-use-local.el was found in your quicklisp directory.
Moreover, its version matches the one bundled with this CLHS ASDF wrapper.
You may proceed with step 2 of 2 below.)
Make Emacs evaluate this form to browse the CLHS locally:
(load "/home/pti/quicklisp/clhs-use-local.el" t)
Use C-c C-d h make-instance RET to test if the change was successful.
If it was, then this will open your browser and the URL will begin with "file:///".
Put the form in your ~/.emacs to persist the change for future sessions.
The README file has some further information,
including a list of 3 useful Slime CLHS lookup commands
and how to get Emacs to open CLHS pages in a different browser.
(Location: /home/pti/quicklisp/dists/quicklisp/software/clhs-0.6.3/README)
; No values
AOC/2024/02>
#+END_SRC
#+BEGIN_SRC emacs-lisp
(load (expand-file-name "~/quicklisp/clhs-use-local.el") t)
#+END_SRC
#+RESULTS:
: t
**** Enable Geiser Mode in Scheme Mode
@ -2443,7 +2521,6 @@ Map the keymap consistently to the eglot mappings.
#+END_SRC
** Debugger Support
#+BEGIN_SRC emacs-lisp
(report-time-since-load "Programming - Debugger Support")