[-- Attachment #1: Type: text/plain, Size: 295 bytes --] For some reason ox-texinfo removes periods from node names. It seems this is not necessary as info can render these files without any issues, and in certain cases not intended (e.g. I had a node named "Emacs 28.1" and it was abbreviated to "Emacs 281"). This patch should resolve the issue: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-ox-texinfo-Allow-for-periods-in-node-names.patch --] [-- Type: text/x-diff, Size: 809 bytes --] From f9a8d9738cb118939a8307bf13f63ec5950bd59b Mon Sep 17 00:00:00 2001 From: Philip Kaludercic <philipk@posteo.net> Date: Tue, 19 Apr 2022 12:17:40 +0200 Subject: [PATCH] ox-texinfo: Allow for periods in node names * ox-texinfo.el (org-texinfo--sanitize-node): Don't remove periods from node names. --- lisp/ox-texinfo.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index a01bb268c..3a2c4791b 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -555,7 +555,7 @@ periods, commas and colons." (replace-regexp-in-string "[ \t]+" " " (replace-regexp-in-string - "[:,.]" "" + "[:,]" "" (replace-regexp-in-string "\\`(\\(.*?)\\)" "[\\1" title))))) (defun org-texinfo--sanitize-title (title info) -- 2.30.2 [-- Attachment #3: Type: text/plain, Size: 24 bytes --] -- Philip Kaludercic
Philip Kaludercic <philipk@posteo.net> writes: > For some reason ox-texinfo removes periods from node names. It seems > this is not necessary as info can render these files without any issues, > and in certain cases not intended (e.g. I had a node named "Emacs 28.1" > and it was abbreviated to "Emacs 281"). According to https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Node-Line-Requirements >> Unfortunately, you cannot reliably use periods, commas, or colons >> within a node name; these can confuse the Info reader. Also, a node >> name may not start with a left parenthesis preceding a right >> parenthesis, as in (not)allowed, since this syntax is used to specify >> an external manual. (Perhaps these limitations will be removed some >> day.) Not that we cannot work around this, but we need something different than the proposed patch. Best, Ihor
Ihor Radchenko <yantar92@gmail.com> writes: > Philip Kaludercic <philipk@posteo.net> writes: > >> For some reason ox-texinfo removes periods from node names. It seems >> this is not necessary as info can render these files without any issues, >> and in certain cases not intended (e.g. I had a node named "Emacs 28.1" >> and it was abbreviated to "Emacs 281"). > > According to > https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Node-Line-Requirements > >>> Unfortunately, you cannot reliably use periods, commas, or colons >>> within a node name; these can confuse the Info reader. Also, a node >>> name may not start with a left parenthesis preceding a right >>> parenthesis, as in (not)allowed, since this syntax is used to specify >>> an external manual. (Perhaps these limitations will be removed some >>> day.) > > Not that we cannot work around this, but we need something different > than the proposed patch. Would you happen to know what the issue is? As I said, the documents appear to render just as expected in my case, but it might just be due to the version or because I didn't hit some specific edge-case. > Best, > Ihor -- Philip Kaludercic
Philip Kaludercic <philipk@posteo.net> writes:
> Would you happen to know what the issue is? As I said, the documents
> appear to render just as expected in my case, but it might just be due
> to the version or because I didn't hit some specific edge-case.
The link I shared is all I know. Apparently, using some symbols in node
names is discouraged by texinfo manual exactly because it can break some
edge cases. The recommendation is replacing those symbols with texinfo
commands, which is less discouraged.
Probably, the right way to approach this issue is using texinfo commands
to insert [.,:] and also issuing a warning during export.
Best,
Ihor
Philip Kaludercic <philipk@posteo.net> writes: > Ihor Radchenko <yantar92@gmail.com> writes: > >> Philip Kaludercic <philipk@posteo.net> writes: >> >>> For some reason ox-texinfo removes periods from node names. It seems >>> this is not necessary as info can render these files without any issues, >>> and in certain cases not intended (e.g. I had a node named "Emacs 28.1" >>> and it was abbreviated to "Emacs 281"). >> >> According to >> https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Node-Line-Requirements >> >>>> Unfortunately, you cannot reliably use periods, commas, or colons >>>> within a node name; these can confuse the Info reader. Also, a node >>>> name may not start with a left parenthesis preceding a right >>>> parenthesis, as in (not)allowed, since this syntax is used to specify >>>> an external manual. (Perhaps these limitations will be removed some >>>> day.) >> >> Not that we cannot work around this, but we need something different >> than the proposed patch. > > Would you happen to know what the issue is? As I said, the documents > appear to render just as expected in my case, but it might just be due > to the version or because I didn't hit some specific edge-case. Personally, if I were interested, I think I would follow-up to the texinfo mailing list (or whatever they have) and ask them? As it even says above: > Perhaps these limitations will be removed some day Maybe they already have been? If not, worst case, I think you probably learn more about what the problem might be. Just a thought. Cheers, TRS-80