* bug#59293: 28.1.90; Erroneous footnote link in Org info manual
@ 2022-11-16 1:22 Ihor Radchenko
2022-11-16 12:42 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-11-16 1:22 UTC (permalink / raw)
To: 59293
Hi,
I am forwarding this from Org mailing list discussion about Org manual.
https://orgmode.org/list/87pmdqfao4.fsf@localhost
In 16.5 Evaluating Code Blocks section of Org info manual, there is an
example code block
#+NAME: random
#+BEGIN_SRC R :cache yes
runif(1)
#+END_SRC
This code block is represented like the following in the texinfo Org
manual source:
@example
#+NAME: random
#+BEGIN_SRC R :cache yes
runif(1)
#+END_SRC
...
@end example
Note the (1). It is unexpectedly shown as a footnote reference and one
can click on (1). This only happens in the info manual. Not in html.
I have checked
https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040example.html
and I do not see anything wrong in the above texinfo source.
I am also not an expert in texinfo.
Could someone more experienced with texinfo check if the observed is
something to be fixed on Org side, on Texinfo side, or maybe on
Info-mode side?
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#59293: 28.1.90; Erroneous footnote link in Org info manual
2022-11-16 1:22 bug#59293: 28.1.90; Erroneous footnote link in Org info manual Ihor Radchenko
@ 2022-11-16 12:42 ` Eli Zaretskii
2022-11-17 5:45 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-11-16 12:42 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: 59293
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Wed, 16 Nov 2022 01:22:28 +0000
>
> In 16.5 Evaluating Code Blocks section of Org info manual, there is an
> example code block
>
> #+NAME: random
> #+BEGIN_SRC R :cache yes
> runif(1)
> #+END_SRC
>
> This code block is represented like the following in the texinfo Org
> manual source:
>
> @example
> #+NAME: random
> #+BEGIN_SRC R :cache yes
> runif(1)
> #+END_SRC
>
> ...
> @end example
>
> Note the (1). It is unexpectedly shown as a footnote reference and one
> can click on (1). This only happens in the info manual. Not in html.
>
> I have checked
> https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040example.html
>
> and I do not see anything wrong in the above texinfo source.
>
> I am also not an expert in texinfo.
>
> Could someone more experienced with texinfo check if the observed is
> something to be fixed on Org side, on Texinfo side, or maybe on
> Info-mode side?
It's a bug in info.el: it fontifies the footnote references, but the
detection of footnote cannot distinguish between "(1)" that is a
reference to a footnote and "(1)" that just stands for itself.
My suggestion is to modify the example in the manual to avoid the
false match, for example use "runif(3)" if possible. Alternatively,
remove the real footnotes and make them notes in parentheses. Or
just live with the problem...
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#59293: 28.1.90; Erroneous footnote link in Org info manual
2022-11-16 12:42 ` Eli Zaretskii
@ 2022-11-17 5:45 ` Ihor Radchenko
2022-11-17 7:11 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-11-17 5:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 59293
Eli Zaretskii <eliz@gnu.org> writes:
>> Could someone more experienced with texinfo check if the observed is
>> something to be fixed on Org side, on Texinfo side, or maybe on
>> Info-mode side?
>
> It's a bug in info.el: it fontifies the footnote references, but the
> detection of footnote cannot distinguish between "(1)" that is a
> reference to a footnote and "(1)" that just stands for itself.
Thanks for clarification. Is it something known but difficult to fix?
> My suggestion is to modify the example in the manual to avoid the
> false match, for example use "runif(3)" if possible. Alternatively,
> remove the real footnotes and make them notes in parentheses. Or
> just live with the problem...
I went with runif(+1).
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=79c64d8c3ac66e13a333a4cbc8ba15e242bc01fb
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#59293: 28.1.90; Erroneous footnote link in Org info manual
2022-11-17 5:45 ` Ihor Radchenko
@ 2022-11-17 7:11 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-11-17 7:11 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: 59293-done
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: 59293@debbugs.gnu.org
> Date: Thu, 17 Nov 2022 05:45:16 +0000
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > It's a bug in info.el: it fontifies the footnote references, but the
> > detection of footnote cannot distinguish between "(1)" that is a
> > reference to a footnote and "(1)" that just stands for itself.
>
> Thanks for clarification. Is it something known but difficult to fix?
AFAIU the code, it detects footnote references by looking for [0-9]+
in parentheses, then fontifies those of the references whose numbers
are smaller than the number of footnotes actually present in the node.
So, for example, if a node has 5 footnotes, "(6)" will not be
fontified, but each occurrence of "(4)" will be fontified.
The comment there says:
;; Don't fontify parenthesized numbers that cannot
;; possibly be one of this node's footnotes. This still
;; doesn't catch unrelated numbers that happen to be
;; small enough, but in that case they should use
;; "@footnotestyle separate" in the Texinfo sources.
> > My suggestion is to modify the example in the manual to avoid the
> > false match, for example use "runif(3)" if possible. Alternatively,
> > remove the real footnotes and make them notes in parentheses. Or
> > just live with the problem...
>
> I went with runif(+1).
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=79c64d8c3ac66e13a333a4cbc8ba15e242bc01fb
That's a good solution, thanks.
So I'm closing this bug report.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-17 7:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 1:22 bug#59293: 28.1.90; Erroneous footnote link in Org info manual Ihor Radchenko
2022-11-16 12:42 ` Eli Zaretskii
2022-11-17 5:45 ` Ihor Radchenko
2022-11-17 7:11 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.