mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-02-05 21:26:18 +00:00
Return expanded code on programmatic calls
* lisp/ob-core.el (org-babel-expand-src-block): Return value of expanded code block on non-interactive calls.
This commit is contained in:
parent
f30866b03b
commit
f51fd88554
@ -630,8 +630,11 @@ arguments and pop open the results in a preview buffer."
|
||||
(org-babel-expand-body:generic
|
||||
body params (and (fboundp assignments-cmd)
|
||||
(funcall assignments-cmd params))))))
|
||||
(org-edit-src-code
|
||||
nil expanded (concat "*Org-Babel Preview " (buffer-name) "[ " lang " ]*"))))
|
||||
(if (called-interactively-p 'any)
|
||||
(org-edit-src-code
|
||||
nil expanded
|
||||
(concat "*Org-Babel Preview " (buffer-name) "[ " lang " ]*"))
|
||||
expanded)))
|
||||
|
||||
(defun org-babel-edit-distance (s1 s2)
|
||||
"Return the edit (levenshtein) distance between strings S1 S2."
|
||||
|
Loading…
x
Reference in New Issue
Block a user