On Thu, Apr 23, 2026 at 10:15:14AM +0800, aidan wrote: > Steps to reproduce: > > 1. execute command: texi2any --info --no-split --output="$HOME/info" dir.texi > > dir.texi: > > ``` > \input texinfo > > @node Top > > @bye > ``` > > 2. execute command: INFOPATH=$HOME/info info --init-file /dev/null texinfo > 3. press ">" to go to the last node > 4. press "]" (or M-x global-next-node) > > Note: > > In the generated dir.info file, replacing > File: dir.info, Node: Top, Up: (dir) > with > File: dir.info, Node: Top > resolves the issue.
Thanks for the report. I have attempted a fix in commit dc78a1a2d7e177 (2026-05-05): Author: Gavin Smith <[email protected]> Date: 2026-05-05 21:28:25 +0100 info: Fix infinite loop * info/session-cmd.c (forward_move_node_structure): Replace call to info_handle_pointer to follow "Up" pointer. Check Up pointer is not to a different file, to avoid going all the way up to "(dir)". Also check that it does not point to the current node, to avoid an infinite loop. Fall through to code handling last node in the file when we can't go Up any more. Remove braces and extra level of indentation. An infinite loop occured when the "dir" node had an Up node. Report from Aidan <[email protected]>. I remember finding this bit of the code confusing from working on it before but hopefully I have left it in a better state than I found it in. > Question: > > The doc says: > > When you create your own ‘dir’ file for use with > ‘Info-directory-list’ or ‘INFOPATH’, it's easiest to start by copying an > existing ‘dir’ file and replace all the text after the ‘* Menu:’ with > your desired entries. That way, the punctuation and special ‘CTRL-_’ > characters that Info needs will be present. > > So is it incorrect to generate dir.info from dir.texi? I wouldn't say it is incorrect, just very unusual. A dir file would normally be updated by install-info. There would not be much benefit in generating it with texi2any, as far as know. There was code in older versions of the info browser (in fact, in Texinfo 7.2 and earlier) that excluded files called "dir.info" from being loaded as a dir file, only accepting files called "dir" (or compressed variants).
