emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 633ca9e69e 1/2: org-babel-read: Fix cells like '"st


From: ELPA Syncer
Subject: [elpa] externals/org 633ca9e69e 1/2: org-babel-read: Fix cells like '"string" more'
Date: Sun, 23 Oct 2022 03:57:49 -0400 (EDT)

branch: externals/org
commit 633ca9e69e57e68a42c893999488e9c67dac49b8
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-babel-read: Fix cells like '"string" more'
    
    * lisp/ob-core.el (org-babel-read): Do not consider every cell
    starting from \" as `read'able.  Check closing \" at least.
    
    Reported-by: Greg Minshall <minshall@umich.edu>
    Link: https://orgmode.org/list/4033335.1638552531@apollo2.minshall.org
---
 lisp/ob-core.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index bd478aad52..c5d88677a1 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -3160,7 +3160,10 @@ situations in which is it not appropriate."
              (or (memq (string-to-char cell) '(?\( ?' ?` ?\[))
                  (string= cell "*this*")))
         (eval (read cell) t))
-       ((eq (string-to-char cell) ?\") (read cell))
+       ((save-match-data
+           (and (string-match "^[[:space:]]*\"\\(.+\\)\"[[:space:]]*$" cell)
+                (not (string-match "[^\\]\"" (match-string 1 cell)))))
+         (read cell))
        (t (org-no-properties cell))))
 
 (defun org-babel--string-to-number (string)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]