> From: Gavin Smith <[email protected]>
> Date: Thu, 22 Oct 2026 20:41:44 +0100
> Cc: [email protected]
> 
> On Thu, Oct 22, 2026 at 01:05:44PM +0300, Eli Zaretskii wrote:
> > > From: Gavin Smith <[email protected]>
> > > Date: Thu, 22 Oct 2026 10:00:17 +0100
> > > Cc: [email protected]
> > > 
> > > On Thu, Oct 22, 2026 at 08:18:57AM +0300, Eli Zaretskii wrote:
> > > 
> > > >  And at
> > > > least in the first example, with the node's header line, AFAIU node
> > > > names should never be quoted there -- did I misunderstand?
> > > 
> > > It needs to be quoted otherwise the node name ends at the comma.
> > 
> > But then the file name also cannot include a comma, or should be
> > quoted if it does.  But the Texinfo manual doesn't say that the file
> > name can be quoted in the node's header line.
> 
> The Info browser doesn't actually do anything with the contents of
> the File: field in the node header line, as far as I remember.  Info
> files function equally well without them.
> 
> If Info readers were going to do something with the File field, then
> texi2any should properly quote it if it has a comma (I checked that it
> doesn't at present).  Do you know if the Emacs Info mode does anything
> with this field?

It does.  Here's a random example, from Info-fontify-node, the
function which reformats and highlights certain parts of a node with
various typefaces to make them stand out and look pretty on display:

              ;; Hide the suffix of the Info file name.
              (beginning-of-line)
              (if (re-search-forward
                   (format "File: %s\\([^,\n\t]+\\),"
                           (if (stringp Info-current-file)
                               (file-name-sans-extension
                                (file-name-nondirectory Info-current-file))
                             Info-current-file))
                   header-end t)
                  (put-text-property (match-beginning 1) (match-end 1)
                                     'invisible t)))))))

This looks for "File: FILENAME," in the node's heading line, and then
makes its file-name extension invisible on display, so
"texinfo.info-1" is shown as just "texinfo".  It obviously expects the
file name to be terminated at the first comma.

There are quite a few of those, you can search info.el for "File:" to
find them.

Reply via email to