branch: externals/org
commit b9ba12c2cb91080c043d5fd61423906898b6f885
Author: Ihor Radchenko <[email protected]>
Commit: Ihor Radchenko <[email protected]>
Make sure to use `org-babel-process-file-name' in babel backends
* lisp/ob-awk.el (org-babel-execute:awk):
* lisp/ob-lilypond.el (org-babel-lilypond-process-basic):
* lisp/ob-plantuml.el (org-babel-execute:plantuml): Protect file names
with `org-babel-process-file-name' to handle tramp paths and special
symbols in file names that can be interpreted by shell.
Reported-by: lux <[email protected]>
Link:
https://orgmode.org/list/[email protected]
---
lisp/ob-awk.el | 2 +-
lisp/ob-lilypond.el | 2 +-
lisp/ob-plantuml.el | 5 ++++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/lisp/ob-awk.el b/lisp/ob-awk.el
index b00cccf9c4..02fd09b5fe 100644
--- a/lisp/ob-awk.el
+++ b/lisp/ob-awk.el
@@ -84,7 +84,7 @@ This function is called by `org-babel-execute-src-block'."
(org-babel-awk-var-to-awk
(cdr pair))))
(org-babel--get-vars params))
- (list in-file))
+ (list (and in-file (org-babel-process-file-name
in-file))))
" ")))
(org-babel-reassemble-table
(let ((results
diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index 02ccc2eead..1de743e565 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -205,7 +205,7 @@ See `org-babel-execute-src-block' for BODY and PARAMS."
("eps" . "--eps ")))
"--png ")
"--output="
- (file-name-sans-extension out-file)
+ (org-babel-process-file-name (file-name-sans-extension out-file))
" "
cmdline
in-file)
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 93b183b966..d1b6b138c1 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -162,7 +162,10 @@ This function is called by `org-babel-execute-src-block'."
(message "%s" cmd) (org-babel-eval cmd "")
(if (and (string= (file-name-extension out-file) "svg")
org-babel-plantuml-svg-text-to-path)
- (org-babel-eval (format "inkscape %s -T -l %s" out-file out-file) ""))
+ (org-babel-eval (format "inkscape %s -T -l %s"
+ (org-babel-process-file-name out-file)
+ (org-babel-process-file-name out-file))
+ ""))
(unless do-export (with-temp-buffer
(insert-file-contents out-file)
(buffer-substring-no-properties