* Bug: Double quotes in tables and arguments
@ 2021-02-05 12:51 Christine Köhn
0 siblings, 0 replies; only message in thread
From: Christine Köhn @ 2021-02-05 12:51 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
I'm working with tokenized texts in org-mode tables including single
characters such as double quotes. When trying to read a cell with an
(unpaired) double quote at the beginning, the cell cannot be read ("End
of file during parsing"). I've looked a bit into this (see attached
file). At first, I thought it's a mere documentation issue: Double
quotes probably have a special meaning. The documentation of
org-bable-read (ob-core.el) does not mention a double quote as special
> "Convert the string value of CELL to a number if appropriate.
> Otherwise if CELL looks like lisp (meaning it starts with a
> \"(\", \"\\='\", \"\\=`\" or a \"[\") then read and evaluate it as
> lisp, otherwise return it unmodified as a string. Optional
> argument INHIBIT-LISP-EVAL inhibits lisp evaluation for
> situations in which is it not appropriate."
This is how cells with double quotes at the beginning are read:
> ((eq (string-to-char cell) ?\") (read cell))
I don't know why double quotes are handled as special characters and I
did not find any documentation on it.
This issue also exists when caching results from code blocks: If a
result starts with an (unpaired) double quote and it is cached, it
cannot be read anymore.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: quote_mwe.org --]
[-- Type: text/x-org, Size: 986 bytes --]
#+begin_src emacs-lisp :var data=""
Double quotes are preserved as long as there is no double quote as
| a" |
Sourrounding double quotes are stripped:
| "a" |
| a |
This is unexpected:
| "this_stays"this_has_to_go |
| this_stays |
(Unpaired) double quote at beginning results in "End of file during
| " |
Passing an argument with (unpaired) double quote as first character to
code blocks works...
| " |
... as long as it's not from a cached result.
#+begin_src emacs-lisp :cache yes
| " |
This results in "End of file during parsing":
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-05 12:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 12:51 Bug: Double quotes in tables and arguments Christine Köhn
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).