Package: gnuplot-doc
Version: 5.4.4+dfsg1-2
Severity: minor
Tags: upstream patch
Forwarded: https://sourceforge.net/p/gnuplot/bugs/2576/

The generated Info manual (gnuplot.info) contains a spurious Texinfo
comment "@c <3 - all terminal stuff is pulled from the .trm files" in
Section 4.1 (complete list of terminals).

What happens is that the docs/doc2texi.el converter transforms the
line starting with "<3" into a Texinfo comment by inserting "@c "
at the beginning of the line (function d2t-get-terminals) with the
intent that this line will not appear in the Info manual (as being
a Texinfo comment). However, the input has not been converted to
the Texinfo format yet, so that function d2t-braces-atsigns
(consisting in the first step of the conversion to Texinfo), which
is called later, assumes that "@c" is real text and adds a "@" in
front of it (to escape the "@" since it is regarded as real text).
As a consequence, one gets a line

  @@c <3 -- all terminal stuff is pulled from the .trm files

in the generated Texinfo file gnuplot.texi, and this line will be
rendered as

  @c <3 -- all terminal stuff is pulled from the .trm files

in the Info manual.

I'm attaching a patch that makes doc2texi.el remove this <3 line
instead of attempting to comment it out.

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.0.0-6-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Description: Remove spurious Texinfo comment from gnuplot.info.
  The docs/doc2texi.el converter transforms the line starting
  with "<3" into a Texinfo comment by inserting "@c " at the
  beginning of the line (function d2t-get-terminals). However,
  the input has not been converted to the Texinfo format yet,
  so that function d2t-braces-atsigns, which is called later,
  assumes that "@c" is real text and adds a @ in front of it.
  As a consequence, one gets a line
    @@c <3 -- all terminal stuff is pulled from the .trm files
  in the generated Texinfo file gnuplot.texi, and this line
  will be rendered as
    @c <3 -- all terminal stuff is pulled from the .trm files
  in the Info manual.
  This patch makes doc2texi.el remove the "<3" line instead of
  attempting to comment it out.
Author: Vincent Lefevre <[email protected]>
Bug: https://sourceforge.net/p/gnuplot/bugs/2576/
Last-Update: 2022-12-30

Index: gnuplot-5.4.4+dfsg1/docs/doc2texi.el
===================================================================
--- gnuplot-5.4.4+dfsg1.orig/docs/doc2texi.el
+++ gnuplot-5.4.4+dfsg1/docs/doc2texi.el
@@ -482,8 +482,8 @@ the end of `d2t-get-terminals'.")
     (save-excursion
       (when (re-search-forward "^<3" (point-max) t)
 	(beginning-of-line)
-	(insert "@c ")
-	(forward-line 1)
+	(let ((eol (save-excursion (end-of-line) (point-marker))))
+	  (delete-region (point-marker) eol))
 	(dolist (elem list)
           (and d2t-verbose (message "    %s ..." elem))
           (setq file (concat d2t-terminal-directory elem ".trm"))
-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to