Slime 2.30: Update installation instructions for package initialization.

Mark Harig <[email protected]> Tue, 20 Aug 2024 21:38:34 +0000 (UTC)
Newsgroups gmane.lisp.slime.devel
Message-ID <[email protected]>
Slime Developers,

   I have tested the following using Emacs 29 (started with `emacs -Q') and=
 Slime 2.30.

   In the Slime Info manual for version 2.30, the installation instructions=
 in the "Installation" section of the "Getting Started" chapter are incompl=
ete.  The text reads:

Slime -> Getting Started -> Installation:

"The easiest way to install and keep SLIME up-to-date is using Emacs=E2=80=
=99s
built-in package manager.  SLIME is available from the MELPA repository.
After setting up the MELPA repository, SLIME can be installed via =E2=80=98=
M-x
package-install RET slime RET=E2=80=99.  You should then define your defaul=
t
Lisp in your =E2=80=98.emacs=E2=80=99 as follows:

     (setq inferior-lisp-program "/opt/sbcl/bin/sbcl")

   At this point, you should be ready to start *note running SLIME:
Running."

If the command M-x slime RET is entered after following the instructions ab=
ove, then the user will see "[Not found]" briefly displayed after M-x slime=
 in the minibuffer.  The reason for this is that Emacs's variable `load-pat=
h' has not been updated to include the directory in which the `package-inst=
all' command has installed Slime.  Adding this directory to `load-path' is =
documented much later in the "Basic Customization" section.

Slime -> Getting Started -> Setup Tuning -> Basic Customization:

"Once you have the basic no-frills setup working, you can enhance your
SLIME installation with bundled extensions:

     ;; _Setup load-path, autoloads and your lisp system_
     (add-to-list 'load-path "~/dir/to/cloned/slime")
..."

The simplest solution to this that I have found is to include the function =
`package-activate-all' in the Emacs user's initialization file (.emacs or s=
ome variant).  This adds the directory of the installed Slime package to th=
e `load-path'.  Instructions to do this could be added to "Installation" se=
ction, above, and removed from the "Basic Customization" section.

Note: According to the Emacs Lisp reference manual, this should not be nece=
ssary because `package-activate-all' is supposed to be run before the user'=
s Emacs initialization file, if the variable `package-enable-at-startup' is=
 set to T.  See the section "(elisp) Packaging Basics" in the Elisp manual:

"   Whenever Emacs starts up, it automatically calls the function
=E2=80=98package-activate-all=E2=80=99 to make installed packages available=
 to the
current session.  This is done after loading the early init file, but
before loading the regular init file (*note Startup Summary::).
Packages are not automatically made available if the user option
=E2=80=98package-enable-at-startup=E2=80=99 is set to =E2=80=98nil=E2=80=99=
 in the early init file.'
..."

Whether the Slime manual should be changed to move the instructions for upd=
ating the value of `load-path' or to add instructions to add a call to `pac=
kage-active-all' to the user's Emacs initialization file, the instructions =
need to corrected so that new users who are following the instructions will=
 get Slime to start as described.  As the instructions are now, Slime will =
not start after a new installation of the package.

--