When I open the Emacs info reader, the top directory node is really cluttered. It's difficult enough to navigate that it puts me off from using it. There are a few things that I can't figure out how to do that would simplify my life a great deal:

  1. Sorting by name. The entries seem to be sorted according to the order they are added, which means that an entry starting with Z comes before an entry starting with A if it is in a directory that comes earlier in Info-directory-list. Can I change this so that I can browse in a sane manner?
  2. Change fill column. I understand there are complexities with hidden text, but the narrow fill column wastes a lot of vertical space. I see Info-refill-paragraphs but this doesn't do what I expect (or anything at all that I can see).
  3. Hide or reorganize entries. I understand the headings are set in the actual info files on my machine, but is there a way to modify this without editing each file? It's frustrating when I don't know if something will appear in "individual utilities" or "utilities" or "gnu utilities" or "network applications" or "basics" or "software development".
  • Those are great ideas! However, I don't think any of that is supported by Texinfo. All such formatting is done either by the author of the node (when they write the file), or during the installation process (i.e., with install-info).
    – Tyler
    Aug 22, 2017 at 21:36
  • @Tyler Thanks for the info. I didn't realize that the directory node depended on Texinfo's output directly. Is it a static file somewhere that is then rendered by Info? If so, maybe I could accomplish some of what I want outside of Emacs.
    – karl
    Aug 22, 2017 at 21:52
  • You have the source code, so you can certainly re-organize your info files however you like, and Emacs has tools to help you do so. But it's not something you can do dynamically as a user. The Texinfo and install-info nodes will get you started, if you're motivated!
    – Tyler
    Aug 22, 2017 at 22:07

2 Answers 2

  1. The top-level dir content of Info is not from a static file. See function Info-insert-dir in info.el.

    You can do C-x C-q to make the buffer writable, then select a set of lines and do M-x sort-lines, to sort by the manual name.

    You can do the same thing programmatically, if you want.

  2. Changing fill-column won't help. As @Tyler suggested, that formatting is done beforehand.

  3. You can hide selected text using text property invisible. But I don't quite understand the last sentence of your #3. Can you elaborate on it? What is the problem you want to solve there?

  • Thanks, I think you've answered this as well as it can be. I didn't realize so much of it relied on work done by texinfo. As for my third question, I'm talking about the categories set in the info files as INFO-DIR-SECTION. There doesn't seem to be any systematic way for people to choose these and so it ends up quite scattered.
    – karl
    Aug 23, 2017 at 3:41

I hesitate to post this as an answer, because it specifically does not apply to the top-level dir node of Info. But it is so close in other respects that I hope it might help, and it is a bit long for a comment.

If you use library Info+ then you can do what you describe and more, for any number of Info manuals. (But it does not help with the top-level dir node.)

If you hit O in a manual then the manual is cloned as an editable, outline-enabled table of contents (TOC).

This is similar to the standard command Info-toc (bound to T), but the buffer is in outline-minor-mode. Also, there is no redundancy, by default: each TOC entry is listed only once, not multiple times. (This is controlled by option Info-toc-outline-no-redundancy-flag.)

You can have any number of such TOCs, for the same manual or for different manuals.

Outline minor mode lets you hide and show, and promote and demote, various parts of the TOC tree for a manual. And since the TOC is editable you can make other changes to it: sort parts of it, delete parts of it, duplicate parts of it, move parts around in an ad hoc way, and so on.

Especially when combined with Info-persist-history-mode, command Info-make-node-unvisited (C-x DEL), and Info+ bookmarking enhancements (e.g., special link highlighting and persistently tracking the number of visits per node), Info-toc-outline gives you a way to organize access and visibility of a manual’s nodes, to reflect how you use it.

(But it does not change the formatting of ordinary Info nodes you visit. As I indicated in my other answer, changing the fill-column has no effect.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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