texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: in info reader leading parentheses parsed twice for references?


From: Patrice Dumas
Subject: Re: in info reader leading parentheses parsed twice for references?
Date: Mon, 20 Feb 2012 11:43:05 +0100
User-agent: Mutt/1.4.2.2i

On Mon, Feb 20, 2012 at 11:10:13AM +0200, Sergey Poznyakoff wrote:
> 
> > 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?

The issue here is not about a missing dot, but about `file' in (file) 
not being interpreted as a target manual.  Unless I missed something,
the code also implies that there is no need for a dot following the ::
as the nodename is immediatly xstrdup'ed from the entry->label
and no dot or anything else is searched for.

This is l. 320. in info-utils.c.


Now on the subject of generating such cross references, it was possible,
in makeinfo in C by having the manual name as part of the node name,
although this is certainly an error in the manual, as for @ref the 
manual should instead be the fourth arguments, and for menu entries,
the reference to external node is explicitly linked with the use of the
format with a label and a node name.

In a menu:

@menu
* (afile)anode::
@end menu

In an ref 

  @ref{(afile)anode}.

Now, as you say, ref like @ref{anode,,,afile} was rendered as 

  *note anode: (afile)anode.

But I found that weird, and we discussed about it with Karl, I believe
we did this discussion privately :-(, I proposed to have it rendered as

  *note (afile)anode::

and Karl agreed as we both thought that the info reader would follow
such a references by interpreting it as a reference to the node anode 
in the manual file afile.  But it seems that it is not the case.

Here is what I propose:
First I think that, in the info reader, we (Sergey?  Maybe I could also
have a try) should add the support, in menu and *note cross ref, for refs 
like:
  (afile)anode:: 
and we should also communicate with the emacs info reader developpers 
to ask them to do the same there.
 
In texi2any, I conditionalize the change on a customization variable, 
set it to false in the default case and set it to true in something 
like 10 years after the change has been pushed to the Info readers to
be sure that only the new info readers are used where the new
manuals are installed.

Do you agree on that?

> 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).

That'd be nice, thanks.  Maybe, once you've done that, I could start
some regression tests of the info reader using this -o feature, by 
comparing the output with a known reference?

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]