Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Ihor Radchenko
Max Nikulin writes: > Another case: > > (org-babel-read "\"Newlines\"\n" t) > "\"Newlines\" > " https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0227e1260 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org develo

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Ihor Radchenko
Max Nikulin writes: > you added to tests, does not cause the error since the unbalanced > parenthesis is after first string. With the new regexp the error might > happen for > > (org-babel-read "\"Quoted closing quote:\\\"" t) > > but it is caught by `ignore-errors'. I added this to the tests.

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
Max Nikulin writes: Quotes are not stripped: On 04/05/2024 18:51, Ihor Radchenko wrote: Fixed, on main. Another case: (org-babel-read "\"Newlines\"\n" t) "\"Newlines\" "

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
On 04/05/2024 18:51, Ihor Radchenko wrote: Max Nikulin writes: Quotes are not stripped: (org-babel-read "\"abc\nsdf\"" t) "\"abc sdf\"" Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=edb5eaaac Thanks (org-babel-read "(\n\"abc\"\n" t) progn: End of file du

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Ihor Radchenko
Max Nikulin writes: >> I do not see why we should limit things to single-line strings. > > Quotes are not stripped: > > (org-babel-read "\"abc\nsdf\"" t) > "\"abc > sdf\"" Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=edb5eaaac > (org-babel-read "(\n\"abc\"\n"

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
On 04/05/2024 15:03, Ihor Radchenko wrote: Max Nikulin writes: 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.

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Ihor Radchenko
Max Nikulin 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 curre

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
On 03/05/2024 19:06, Ihor Radchenko wrote: Max Nikulin writes: What I do not like in `org-babel-read' is false positive for escaped quote when actually backslash is escaped: (org-babel-read "\"1\" 2 \"3\"" t) "1\\" Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-03 Thread Ihor Radchenko
Max Nikulin writes: > What I do not like in `org-babel-read' is false positive for escaped > quote when actually backslash is escaped: > > (org-babel-read "\"1\" 2 \"3\"" t) > "1\\" This is a bug. Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2028bb15c

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-02 Thread Max Nikulin
On 01/05/2024 19:19, Ihor Radchenko wrote: And replacing the call to org-babel-string-read with org-babel-read does not break any tests... Since 005e68294 2009-06-11 17:04:42 -0700 Eric Schulte: making progress bringing org-babel-R.el into the new evaluation schema `org-babel-string-rea