Subject: Re: bug#74844: m-buffer: Broken Top Directory node in Info manual due to malformed Texinfo direntry

From: Eli Zaretskii <[email-masked]>
Date: Sat, 14 Dec 2024 16:47:37 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked], Ihor Radchenko
>  <[email-masked]>
> Date: Sat, 14 Dec 2024 08:53:04 -0500
> 
> >> > However, the @direntry as
> >> > noted in the "dir" and "m-buffer-doc.info" files is "* m-buffer.doc."
> >> 
> >> Hmm... yup.
> >> I pushed to Emacs a fix for the generation of that Texinfo element in
> >> `ox-texinfo.el` and to `m-buffer` I pushed another change which tries to
> >> workaround that bug (for when it's used with an older Emacs).
> >> 
> >> The patch for `ox-texinfo.el` is below.  It's "obviously safe", but
> >> I suspect it's too late for Emacs-30.  Eli?
> >
> > Maybe.  For now, I don't think I understand the fix.  What is 'dn' in
> > this snippet?  The command above says something (which need to be
> > fixed to follow the code change, btw), but I'm not sure it is accurate
> > or complete.
> >
> > An entry in DIR can be either
> >
> >      * TITLE: (FILE).           DESCRIPTION
> > or
> >      * TITLE: (FILE)NODE.       DESCRIPTION
> 
> [ Side question: Where is this documented?  ]

In the Texinfo manual, in the node "Menu Parts" (since the DIR file is
just a giant menu).

> > What is 'dn' in the above scheme?  And what is 'file'?
> 
> `dn` is your TITLE and `file` is your FILE.

Then I'm not sure this is correct:

+              (t (format "* %s: (%s)." (or dn file) (or file dn))))))

What if FILE is nil?  Can it be nil at this point?  The part in the
parentheses _must_ identify an Info file, with or without a node.  It
cannot be the TITLE, because that one can be arbitrary text.

The change is simple, so once we agree that it cannot do the wrong
thing, installing on emacs-30 is fine by me, assuming Ihor doesn't
object.