reddit / emacs

How to generate tags table for Info pages? (macOS emacs 28.1 installed with Homebrew)

snailiens · 2022-08-01 22:08
Hi, I'm new to emacs and have been working my way through various Info manuals I find interesting. Right now I'm on the "eintr" one (the intro to Lisp one). In section 4.1 "Finding More Information", it says the following: For example, ‘xref-find-definitions’ will jump to the various nodes in the Texinfo source file of this document (provided that you’ve run the ‘etags’ utility to record all the nodes in the manuals that come with Emacs; see (emacs)Create Tags Table). When I try the command **M-.** it puts this in the minibuffer: Visit tags table (default TAGS): /usr/local/Cellar/emacs/28.1/share/info/emacs/ Which I interpret to mean I do not have a TAGS file already generated for the Info pages. If I navigate to: /usr/local/Cellar/emacs/28.1/share/info/emacs And then do: etags eintr.info.gz It does create a TAGS file, but it doesn't look right. Every line starts with "function", which makes me think etags interpreted this as the wrong language. I'm assuming the language expected is texinfo (based on the Info pages own text), so I tried manually specifying the language: etags -l texinfo eintr.info.gz But it creates an almost-empty TAGS file. Now I'm kind of stumped. Anyone have any ideas how I can get tags working within Info mode? Thanks!
_viz_ · 2022-08-02 04:58
Reread what the manual says, >For example, ‘xref-find-definitions’ will jump to the various nodes in the Texinfo ***source*** [emphasis mine] file of this document (provided that you’ve run the ‘etags’ utility to record all the nodes in the manuals that come with Emacs; see (emacs)Create Tags Table). It talks about the texinfo source while you're running etags on the generated info file. No wonder, it didn't do anything.
snailiens · 2022-08-02 16:22
That makes sense, thank you. It seems like the emacs I installed (using homebrew) may not have included the texinfo source, just the generated Info files... I've tried googling around for how to get the texinfo source and everything I'm finding is how to convert FROM texinfo, but nothing about where to get the original texinfo. Do you have any ideas where I could find this?
_viz_ · 2022-08-02 16:28
Clone the git repository. I'm not sure if the release tarballs have the texinfo files.
snailiens · 2022-08-02 16:31
Ok thank you, will give that a shot!