8

Sometimes describe- or apropos- are not enough. How can I search the Emacs Lisp Reference Manual (C-h i m elisp) from within emacs?

  • 2
    As an aside, a shorter way to reach the elisp manual is C-h r TAB RET. – legoscia Oct 7 '14 at 12:30
  • @legoscia: Uh, no. C-h r (command info-emacs-manual) reaches the Emacs manual, not the Elisp manual. – Drew Oct 7 '14 at 19:39
  • 2
    It does. However, the first link in the top node happens to lead to the Elisp manual, which is why the additional TAB RET brings you to the right place. – legoscia Oct 7 '14 at 19:41
  • @legoscia: C-h i 5 is shorter than both C-h r TAB RET and C-h i m elisp RET. – Drew Mar 27 '15 at 19:39
10

EDIT: I just found the wonderful M-x info-apropos which searches full text over all info documents and returns the relevant nodes. Seems this gem is relatively unknown.

If you use helm package from MELPA with helm-mode on, using either i (info-index) or I (info-virtual-index) pops up a helm window with the index terms. You can then use typical helm completion patterns to discover and browse the index.

12

You can use elisp-index-search. I use it daily. I use it mostly when I already know a function name and want to see it in emacs lisp manual.

  • Does this essentially do an info-apropos and jump to what it deems the best match? – elarson Oct 7 '14 at 20:07
  • I just tried info-apropos. It seems to search all info doc, but elisp-index-search only search elisp manual. I tried to find the doc for elisp-index-search but wasn't successful. I learned about it by calling describe-key on the menu 【Help→Search Documentation→Lookup Subject in Elisp Manual…】 – Xah Lee Oct 7 '14 at 20:09
6

More of a full text search but C-s (isearch-forward) will search through the whole info document if you repeat enough times. I use it mostly as a desperation measure when I can't work out the actual term that appears in the index.

3

The closest I know of is searching the index by running Info-virtual-index (bound to I) from within the manual.

2

In addition to what others have mentioned, Icicles facilitates browsing and searching Info manuals.

  1. Remember that i (Info-index) is your friend in Info. Start your search with it. It is typically more useful than a brute-force text search, because a human has indexed useful terms.

    Unfortunately, although i in vanilla index accepts a substring of an index entry as input (using RET), it does not provide substring, let along regexp, completion. In Icicle mode, i in Info is bound to icicle-Info-index, which provides such completion, and it also lets you filter using multiple patterns (progressive completion). It is also a multi-command, which means that with a single i invocation you can visit any number of occurrences for any number of index entries.

  2. With Icicles, you can optionally have i and other Info commands highlight a bit differently, in buffer *Completions*, completion candidates that correpond to Info nodes that you have already visited. This is handy to avoid revisiting a node that you have already consulted, when searching in different ways. It helps especially with double-entry indexing, that is, multiple index entries to the same node.

  3. In addition to index lookup, you can search an Info manual. In vanilla Emacs you can use C-s or C-M-s repeatedly to do this. This can be handy in cases where i does give you the help you want.

    With Icicles, you can limit searching to a particular set of nodes. g (Info-goto-node) accepts multi-completion input. You can provide a pattern (regexp, substring, etc.) that matches node names or a pattern that matches node content, or both. Matching a pattern against node content means searching manual content. The completion candidates shown in *Completions* are the node names.

    You can search a set of nodes or an entire manual. After you choose one of the matching nodes to visit, you can use C-M-s to find each match of the content-search pattern within the node. And just as for i, g is a multi-command, which means that you can visit any number of nodes in a single g invocation.

  4. You can create virtual books composed of different sets of nodes (even from different manuals), and save these persistently, for reuse later. Searching a smaller set of nodes (a sub-manual) can be faster.

See here for more info about Icicles Info enhancements.

0

You can also use s to search the current document for the next instance of a given regular expression. Repeated presses of s-<RET> will iteratively search for the next instance of the same expression. https://www.gnu.org/software/emacs/manual/html_node/info/Search-Text.html#Search-Text

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.