GNU bug report logs -
#62869
Texinfo: texi-fragment->stexi: Parsing verbatim fails when no newline
Previous Next
To reply to this bug, email your comments to 62869 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#62869
; Package
guile
.
(Sat, 15 Apr 2023 19:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Luis Felipe <sirgazil <at> zoho.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Sat, 15 Apr 2023 19:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
When a "verbatim" fragment doesn't end in a newline character, parsing
fails. This failure seems like a defect to me because it only happens
with the "verbatim" command, and not with similar block commands like
"example", "lisp", "display" and "format".
Operating system: Guix System x86_64 Kernel: 6.1.14-gnu
GNU Guile: 3.0.9
STEPS TO REPRODUCE
1. Start a Guile REPL
2. Run the following code:
#+begin_src scheme
(use-modules (texinfo))
(texi-fragment->stexi
"Example:\n\n <at> verbatim\n(+ 3 5)\n <at> end verbatim")
#+end_src
EXPECTED RESULT
I get the following stexi fragment:
#+begin_src scheme
(*fragment* (para "Example:") (verbatim "(+ 3 5)\n"))
#+end_src
UNEXPECTED RESULT
I get the following error:
#+begin_example
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `parser-error' with args `(#<input: string 7f5fad5c02a0>
"EOF while reading a token " "reading verbatim")'.
In texinfo.scm:
1132:22 5 (parse _)
980:31 4 (loop #<input: string 7f5fad5c02a0> (*fragment*) _ _ _)
890:16 3 (visit _ #<input: string 7f5fad5c02a0> _ _)
537:20 2 (read-verbatim-body
#<input: string 7f5fad5c02a0>
#<procedure 7f5fad076948 at texinfo.scm:1069:3 (str…> …)
In sxml/ssax/input-parse.scm:
88:2 1 (next-token _ _ _ _)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)
#+end_example
WORKAROUND
Append a newline character to the texi fragment, like so:
#+begin_src scheme
(use-modules (texinfo))
(texi-fragment->stexi
"Example:\n\n <at> verbatim\n(+ 3 5)\n <at> end verbatim\n")
#+end_src
--
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/
[OpenPGP_0x0AB0D067012F08C3.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
This bug report was last modified 1 year and 226 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.