2021-03-20 Using index in the Emacs Info viewer

Recently I was checking how to use the index in the Emacs Info viewer. First of all, let me mention that it is really, really great, and I would love it if more software used this format. Imagine having all MDN Web Docs within Emacs – no network latency, everything available without even touchning the mouse… Or even better – the whole DevDocs project… Now that I think of it, I guess writing a tool to automatically convert it should not be too difficult to write – any volunteers?

Anyway, let’s get back to reality. The index. I knew for quite a long time that pressing i in an Info buffer lets you search the index (with autocompletion, of course!), but I didn’t know (or didn’t remember) that an index entry may point to more than one place in the Info doc. If that is the case, pressing , (the comma) moves you to the next occurrence, which is very handy.

But it gets even better. You can press I (that is, S-i, or i with shift), and Emacs creates a “virtual index” – a virtual node containing a menu constructed from all the occurrences of the given term in the index. If you then press u or ^ (Info-up), you will land in a node containing all such virtual indices created in this particular Emacs session. How cool is that?

Interestingly, it seems that the reference to the node with the virtual index (or the one with the list of the virtual indices) does not appear in the main list of nodes – but this is not a problem, since you can just create it again (or another one and go up).

Happy reading the docs!

CategoryEnglish, CategoryBlog, CategoryEmacs