all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fixing the automatic generation of Tex info node names
@ 2022-04-19 10:35 Philip Kaludercic
  2022-04-19 10:58 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Philip Kaludercic @ 2022-04-19 10:35 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Fixing the automatic generation of Tex info node names
  2022-04-19 10:35 Fixing the automatic generation of Tex info node names Philip Kaludercic
@ 2022-04-19 10:58 ` Ihor Radchenko
  2022-04-19 11:21   ` Philip Kaludercic
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2022-04-19 10:58 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fixing the automatic generation of Tex info node names
  2022-04-19 10:58 ` Ihor Radchenko
@ 2022-04-19 11:21   ` Philip Kaludercic
  2022-04-20  4:28     ` Ihor Radchenko
  2022-05-04 22:52     ` TRS-80
  0 siblings, 2 replies; 5+ messages in thread
From: Philip Kaludercic @ 2022-04-19 11:21 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fixing the automatic generation of Tex info node names
  2022-04-19 11:21   ` Philip Kaludercic
@ 2022-04-20  4:28     ` Ihor Radchenko
  2022-05-04 22:52     ` TRS-80
  1 sibling, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2022-04-20  4:28 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fixing the automatic generation of Tex info node names
  2022-04-19 11:21   ` Philip Kaludercic
  2022-04-20  4:28     ` Ihor Radchenko
@ 2022-05-04 22:52     ` TRS-80
  1 sibling, 0 replies; 5+ messages in thread
From: TRS-80 @ 2022-05-04 22:52 UTC (permalink / raw)
  To: emacs-orgmode

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-04 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-19 10:35 Fixing the automatic generation of Tex info node names Philip Kaludercic
2022-04-19 10:58 ` Ihor Radchenko
2022-04-19 11:21   ` Philip Kaludercic
2022-04-20  4:28     ` Ihor Radchenko
2022-05-04 22:52     ` TRS-80

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.