forked from mirrors/org-mode
org-babel: all languages now returning lists as pure emacs-lisp, not quoted emacs-lisp
This commit is contained in:
parent
722dd7eb5c
commit
3386a702f8
|
@ -107,11 +107,12 @@ Emacs-lisp table, otherwise return the results as a string."
|
|||
(org-babel-read
|
||||
(if (string-match "^\\[.+\\]$" results)
|
||||
(org-babel-read
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results)))))
|
||||
(concat "'"
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results))))))
|
||||
results)))
|
||||
|
||||
(defun org-babel-clojure-var-to-clojure (var)
|
||||
|
|
|
@ -125,11 +125,12 @@ Emacs-lisp table, otherwise return the results as a string."
|
|||
(org-babel-read
|
||||
(if (and (stringp results) (string-match "^\\[.+\\]$" results))
|
||||
(org-babel-read
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
"," " " (replace-regexp-in-string
|
||||
"'" "\"" results)))))
|
||||
(concat "'"
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
"," " " (replace-regexp-in-string
|
||||
"'" "\"" results))))))
|
||||
results)))
|
||||
|
||||
(defun org-babel-haskell-export-to-lhs (&optional arg)
|
||||
|
|
|
@ -97,11 +97,12 @@ Emacs-lisp table, otherwise return the results as a string."
|
|||
(if (or (string-match "^\\[.+\\]$" results)
|
||||
(string-match "^(.+)$" results))
|
||||
(org-babel-read
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results)))))
|
||||
(concat "'"
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results))))))
|
||||
results)))
|
||||
|
||||
(defvar org-babel-python-buffers '(:default . nil))
|
||||
|
|
|
@ -105,14 +105,16 @@ specifying a var of the same value."
|
|||
(defun org-babel-ruby-table-or-string (results)
|
||||
"If the results look like a table, then convert them into an
|
||||
Emacs-lisp table, otherwise return the results as a string."
|
||||
(message "converting %S" results)
|
||||
(org-babel-read
|
||||
(if (and (stringp results) (string-match "^\\[.+\\]$" results))
|
||||
(org-babel-read
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results)))))
|
||||
(concat "'"
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results))))))
|
||||
results)))
|
||||
|
||||
(defun org-babel-ruby-initiate-session (&optional session params)
|
||||
|
|
|
@ -104,11 +104,12 @@ Emacs-lisp table, otherwise return the results as a string."
|
|||
(org-babel-read
|
||||
(if (string-match "^\\[.+\\]$" results)
|
||||
(org-babel-read
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results)))))
|
||||
(concat "'"
|
||||
(replace-regexp-in-string
|
||||
"\\[" "(" (replace-regexp-in-string
|
||||
"\\]" ")" (replace-regexp-in-string
|
||||
", " " " (replace-regexp-in-string
|
||||
"'" "\"" results))))))
|
||||
results)))
|
||||
|
||||
(defun org-babel-sh-initiate-session (&optional session params)
|
||||
|
|
Loading…
Reference in New Issue