[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: in info reader leading parentheses parsed twice for references?
From: |
Sergey Poznyakoff |
Subject: |
Re: in info reader leading parentheses parsed twice for references? |
Date: |
Mon, 20 Feb 2012 11:10:13 +0200 |
Hi Patrice,
> My understanding of the calls leading to gathering all the xrefs in a node
> (a similar issue with similar calls certainly arises for menu entries)
> is along
>
> info_xref_item
> info_select_reference_this_line
> -> info_menu_or_ref_item (.... info_xrefs_of_node)
> info_xrefs_of_node -> info_xrefs ->
> info_references_internal(INFO_XREF_LABEL, )
Yes, that's quite correct.
> In info_references_internal INFO_XREF_LABEL is found, then a following :
> is searched for. If there is another :, the node name is used directly
> (As a side note, I don't really understood if/how the filename is determined
> in that case if the note is like *Note (file)node::).
To the best of my knowledge I know of no valid way to generate such a
cross reference. References generated with a @xref command must end with a
dot or comma, otherwise makeinfo bails out. References generated with a
@pxref should end with a parenthesis. Finally, those generated with @ref
always end with a dot because makeinfo itself adds it.
Am I missing something?
> In info_parse_node, first the (FILENAME) is determined taking into account
> nested parentheses. At the end of this code, the position is set at the
> last correctly nested closed parentheses (l. 109):
To be strict, it is set *past* that parenthesis, unless it ends the line.
> Then node name is parsed with a skip_node_characters (in search.c) call.
> But in skip_node_characters it seems that nested parentheses beginning
> the string are again taken into account. Isn't there something strange
> here?
Yes, it is strange indeed. I have scanned quite a few existing info
documents, but have not found a single context where this logic might
be needed. It might well be a leftover from some previous version...
FWIW, I guess this needs some more investigation.
> I also don't know excactly how to test for those issues as it would require
> the info reader to print somewhere the results of parsing node names and
> file names of cross refs.
That would be a nice feature. I'll see if it can be incorporated into
the "dump mode" (which is enabled when the `-o' option is given).
Regards,
Sergey