[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some links to external manuals not followable in Info output
From: |
Gavin Smith |
Subject: |
Re: Some links to external manuals not followable in Info output |
Date: |
Wed, 3 Apr 2024 12:42:20 +0100 |
On Wed, Apr 03, 2024 at 12:09:04PM +0200, Patrice Dumas wrote:
> On Tue, Apr 02, 2024 at 09:56:40PM +0100, Gavin Smith wrote:
> > If a cross-reference appears like
> >
> > @xref{,,, texi2any_api, GNU Texinfo @command{texi2any} Output
> > Customization}.
> >
> > with no first argument, then this is output in Info like
> >
> > *Note (texi2any_api)::.
> >
> > - with no node argument following the manual. The Info browser (at least
> > recent versions of it; I checked 6.8 and 7.1) cannot follow such links
> > (I didn't check with Emacs). However, texi2any does not warn about
> > such constructs.
>
> Here is a patch for the Info reader. It passes the tests and in a test
> with a minimum info file, followed a cross-reference as above. But I
> may have overlooked interactions with other parts of the code.
I've committed this in your name. I found it hard to understand too
(even though I was responsible for much of this code). scan_reference_marker
and scan_reference_target both find the targets of a reference. However,
I don't feel like attempting to do a larger rewrite.
>
> --
> Pat
> diff --git a/info/scan.c b/info/scan.c
> index 4b7dfe8754..007498dabc 100644
> --- a/info/scan.c
> +++ b/info/scan.c
> @@ -1135,7 +1135,7 @@ scan_reference_label (REFERENCE *entry, int in_index)
> len = read_quoted_string (inptr + label_len, ":", max_lines,
> &entry->nodename);
> canonicalize_whitespace (entry->nodename);
> - if (!len)
> + if (!len && !entry->filename)
> return 0; /* Input invalid. */
> label_len += len;
> }