21

I was expecting the Emacs Lisp Reference Manual at (C-h i m elisp). But there was no menu elisp or lisp there. C-h v and C-h f work fine for variables or functions though. C-h i 5 takes me to file permissions.

What other binding is standard to find something like this?

Is that something that has to be installed?

Tyler
  • 21,719
  • 1
  • 52
  • 92
Pierre B
  • 381
  • 1
  • 4

2 Answers2

18

This is a great question!

I've found the directions online to install it by hand unclear and, frankly, a bit of a pain (at least on Debian).

On Debian...

Emacs on Debian doesn't come with the Emacs Lisp Reference Manual by default. It's kind of silly, but Debian stores it in the non-free repos. Unfortunately, a regular apt-get install doesn't Just Work™.

Note: Before proceeding, I assume you've installed Emacs from an official Debian mirror and not compiled from source or installed from some random .deb from some random dude on the Internet.

To begin, you need to include non-free repos. Do this by appending non-free1 to the end of each entry in /etc/apt/sources.list, like

deb http://http.us.debian.org/debian stable main non-free

You'll need to run sudo apt-get update to refresh the package listing.

Once you've updated the package listing, install the package emacs-common-non-dfsg, like

sudo apt-get install emacs-common-non-dfsg

Note that older releases of Debian or Ubuntu may not have emacs-common-non-dfsg; in those cases, you'll need to add the Emacs version number, i.e.,

sudo apt-get install emacs25-common-non-dfsg

You may need to restart Emacs, or close and restart the Emacs info-browser.

Manually installing...

I have not tested this, but it also ought to be possible to just point Emacs to the appropriate file. The source is called elisp.info and is available at gnu.org. You'll want the "Info document" link. Check C-h v Info-default-directory-list to see where the default Info directory is. You ought to be able to either place the emacs.info file there or add another directory to the Info-additional-directory-list with

(add-to-list 'Info-additional-directory-list "/path/to/my/info")

You can read more about the info path on the EmacsWiki.

1 DISCLAIMER: Although the Emacs Lisp Reference Manual is libre, including non-free repos does open you to non-free software.

2 This should install the Emacs Lisp Reference Manual as emacs.info.gz to /usr/share/info. Strictly speaking, it seems like dpkg is the only dependency, but I couldn't get Emacs to recognize the new contents in /usr/share/info without install-info. Maybe someone could clarify why, but that's more a Debian question than an Emacs one...

Lorem Ipsum
  • 4,327
  • 2
  • 14
  • 35
  • I don't think you need to install `install-info`, it will be installed automatically as a dependency. You can get the current manuals with `emacs-common-non-dfsg`, which will link to the latest manual; `emacs25-common-non-dfsg` will link to the emacs25 manuals, even if you are using a newer version. – Tyler Dec 13 '19 at 16:58
  • `install-info` is a dependency of `emacs-??-common`. The command `install-info` is required to update info/dir entires (probably called by install scripts) – jue Dec 13 '19 at 17:17
  • @jue Yes, that's correct. All I meant was that the command `apt-get install emacs-common-non-dfsg` is enough, as `apt-get` will automatically install any dependencies, including 'install-info`. – Tyler Dec 13 '19 at 18:42
  • @jue I don't mean my comments as a criticism of the answer, I just wanted to update a few things since I'm recommending other questions are a duplicate of this one. (ie https://emacs.stackexchange.com/questions/54349/how-do-i-install-an-introduction-to-programming-in-emacs-lisp?noredirect=1&lq=1) – Tyler Dec 13 '19 at 18:44
  • @Tyler thanks for clarifying the install steps. No offense taken! I don't have time to update my response atm. If you've confirmed the steps, feel free to edit my answer. Otherwise I'll probably get to it when I update to Buster. – Lorem Ipsum Dec 13 '19 at 18:56
  • @Tyler I just wanted to share my knowledge. :) – jue Dec 16 '19 at 10:02
3

Ubuntu 1. Download https://www.gnu.org/software/emacs/manual/info/elisp.info.gz to your /usr/share/info directory. 2. From a terminal run update-info-dir command. 3. From emacs C-h i m Elisp (capital E).