On Tue, Oct 27, 2026 at 12:41:15PM +0200, Eli Zaretskii wrote:
> > I attach the .texi and .info in case you would like to test it.
> 
> This is very hard to support properly in Emacs.  The reason is that,
> once the node name is gleaned from its reference, either in a menu or
> in a cross-reference, the Emacs Info reader strips the ^?..^? quoting
> from it.  That's because the node name is then used in gazillion
> places: for entering it into node history and comparing with other
> node names, for showing it on the mode line, the header line, and the
> breadcrumbs, for displaying it in a tooltip when the mouse hovers
> above the reference -- and, of course, for going to that node when the
> user types RET or clicks the mouse on the reference.  (Keeping the
> quoting instead would require to remove them each time the node name
> is used as a string, without interpreting it, which is both much more
> complex and would create a lot more temporary strings all over.)  And
> when the quoting is stripped, there's nothing to tell the rest of the
> code that the parenthesized part of the node name is not a reference
> to a file name of an external manual, a convention that is deeply
> entrenched in how an Info reader handles node names.

Indeed, if the quoting is stripped, this is difficult.  One option,
maybe, could be to add the current manual as a leading manual, I have
seen that when testing some commands with the standalone Info reader,
such that the reference becomes, for example (if in the f.info manual):
 (f)(toto)titi
instead of
 (toto)titi

> Moreover, I don't see how such node names can be supported
> consistently in any Info reader, because at least when the user tells
> the reader to go to a node by name, typing "(foo)bar" at the reader's
> prompt _must_ be interpreted as node "bar" inside file "foo", or else
> we will break compatibility with a long-standing tradition in Info
> usage.

I tested with the standalone Info reader, and indeed g and G do not work
with a parenthesized name, or, rather, it is proposed for completion,
but interpreted as an external node, as you say.  However, it works well
in for all the other commands I tested, such as m, f, M-TAB, i.

>  And it's unreasonable to ask the user to type the quoting
> characters to prevent such interpretation.

I tried to add DEL with C-q in the standalone Info reader, and it did
not seem to work.  Regardless, I agree that it is unreasonable to ask
the user to type the quoting characters (but it could still have
worked, can be useful for testing).

I tried
 g(f)(toto)titi
and it works, but there is no completion.

> So I think we do not need to support such node names.  If some manual
> uses them, they are on their own.

My feeling is that with the standalone Info reader, it is not so bad.  I
do not thing that G is often used, not having the possibility to go to
some node with g without prepending the manual name is clearly annoying.
Yet, it is not a show stopper in my opinion.

Let see what Gavin says.

-- 
Pat

Reply via email to