4

Using C-h R elisp brings up the Emacs Lisp Reference Manual in Info mode.

How can I show the manual entirely on one page?

Something akin to https://www.gnu.org/software/emacs/manual/html_mono/elisp.html?

8
  • What do you mean by “entirely on one page”?
    – db48x
    Aug 30 at 13:19
  • 1
    I don't think that's possible, and I don't see the benefit. Perhaps you could share what you're trying to do.
    – aadcg
    Aug 30 at 13:24
  • @db48x exactly as described on this page: gnu.org/software/emacs/manual/elisp.html; not sure how I can be any more descriptive Aug 30 at 13:26
  • @aadcg Having the entire manual on one page would let my swiper through the document github.com/abo-abo/swiper Aug 30 at 13:29
  • 2
    @JohnDeBord that's exactly what I thought. Swiper won't be of any help here. You need tools to search info manuals that are provided by info itself! Take a look at the following commands: Info-search (bound to s) and info-apropos. Take the opportunity to read the info manual that teaches you how to use info :) M-x Info-help; evaluate (info "(info) Advanced").
    – aadcg
    Aug 30 at 13:50
8

If you use Info+ then you can easily get a whole manual, or any node together with its subnodes, in a single, fully functional Info buffer.

Command Info-merge-subnodes, bound to + in Info-mode, integrates the current Info node with its subnodes (the nodes in its Menu), perhaps recursively. Use it to extract a self-contained report (possibly the whole manual) from an Info manual. The report is itself an Info buffer, with hyperlinks and normal Info behavior.

There are various prefix-argument possibilities that govern just how subnodes are treated (recursively or not, for instance). There are a few user options that let you customize the report appearance. Here's what C-h k + tells you:

+ runs the command Info-merge-subnodes (found in Info-mode-map), which is an interactive compiled Lisp function in info+.el.

It is bound to +, menu-bar Info Merge Subnodes.

(Info-merge-subnodes &optional RECURSIVE-DISPLAY-P RECURSIVE-CALL-P)

Integrate current node with nodes referred to in its Menu.

Displays the current Info node, together with the nodes in its Menu. Buffer *Info: NODE* is used for the display, where NODE is the name of the current node. The contents of this node's subnodes (the nodes named in this node's Menu) are included in the buffer, following the contents of the current node.

Optional arg RECURSIVE-DISPLAY-P (prefix arg if interactive) governs the way menus of subnodes are treated:

  • If nil, nothing additional happens. Subnode menus are not explored. Only the current node and its immediate subnodes are documented, in the single display buffer *Info: NODE*.

  • If non-nil, then the subnodes of a node are treated in the same way as the parent node, recursively: If any of them has, itself, a Menu, then that menu's subnodes are also explored, and so on.

    • If RECURSIVE-DISPLAY-P is zero, then a single display buffer is used for all of the nodes explored. Otherwise, a separate display buffer is used for each subnode that has a Menu (see next).

      Use this when you want a single, flat compilation of the current node and all of its subnodes. It is less appropriate when the current node has several levels of subnodes: The flattened result can be difficult to read.

    • If RECURSIVE-DISPLAY-P is positive, then the contents of each subnode are displayed twice: once in the parent node's display, and once in the subnode's own display.

      Use this when the current node has several levels of subnodes and you want each display buffer to be self-contained.

    • If RECURSIVE-DISPLAY-P is negative, then there is no redundancy: A subnode's contents are only displayed in its parent's buffer. The subnode's own display buffer only contains the contents of its own subnodes.

      Use this when the current node has several levels of subnodes and you want no redundancy between the display buffers.

The user option (variable) Info-subtree-separator is a string to be inserted by Info-merge-subnodes just before the title of each node (preceding its description). By default it is "\n* ", producing a node title resembling a menu item. Setting this to "\f\n* " will cause a page break before each node description. For more on setting this variable, type C-h v Info-subtree-separator.


Optional second arg RECURSIVE-CALL-P is only for internal use. It is used to indicate whether (non-nil) or not (nil) this is a recursive (i.e. not a top-level) call to Info-merge-subnodes. Non-nil means that this is a subnode, and that its contents should only be included in the present display if RECURSIVE-DISPLAY-P is also non-nil. For proper operation when RECURSIVE-DISPLAY-P is zero, the non-nil value of RECURSIVE-CALL-P should be the node name of the top-level call to Info-merge-subnodes.

3
  • Wasn't aware this package existed; thanks! Aug 30 at 14:30
  • Been using it for years, didn't know (or forgot) that it could do this. Thanks as always Drew. Sep 1 at 21:48
  • @PhilHudson: It was actually the first thing I did - the initial reason for creating info+.el, back in 1996! It's hardly changed since then - see the Change log in the file.
    – Drew
    Sep 1 at 23:09
4

The info buffers already contain the whole manual. They just use narrowing to show one section at a time.

If you want to see the whole thing, just do C-x n w to widen the buffer.

No need for packages.

EDIT: Since Info-mode re-narrows the buffer when following links, one can use an advice to keep the buffer wide:

(defun widen-after-info-follow (&rest _)
  (widen))

(advice-add 'Info-follow-nearest-node :after 'widen-after-info-follow)
2
  • Is there a way to also get all of the links to work as well? Aug 30 at 23:12
  • 1
    @JohnDeBord Yeah. I've edited the answer to show how one can keep the buffer wide when following links.
    – JoL
    Aug 30 at 23:24

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.