Max Nikulin <maniku...@gmail.com> writes:

>>> (org-babel-read "\"1\\\\\" 2 \\\\\"3\"" t)
>>> "1\\"
>> 
>> Fixed, on main.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2028bb15c
>
> I have no idea if "other\n\"string\"\nlines" may be passed 
> `org-babel-read', but it is not discarded by the current regexp:
>
> "^[[:space:]]*\"\\(.*\\)\"[[:space:]]*$"

I do not see why we should limit things to single-line strings.

> Is there a reason why it is necessary to call `read' twice on the same 
> content? From my point of view, result of first call may be returned.

Yes, it can. 

> Does `read' have other role than unescaping backslash-protected 
> characters? Likely it can be done by `replace-regexp-in-string', see the 
> attachment. ...

> +(defconst org-babel--quoted-string-regexp
> ...

1. read is faster
2. read is less maintenance - we can rely upon robust implementation
   provided by Emacs itself instead of doing something custom, with
   potential bugs.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to