mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-21 06:19:01 +00:00
ob-eval.el (org-babel-shell-command-on-region): Use executable-find' for local
shell-file-name'
* ob-eval.el (org-babel-shell-command-on-region): Use `executable-find' for local `shell-file-name'.
This commit is contained in:
parent
31e765a105
commit
79dd795fe4
|
@ -137,11 +137,17 @@ specifies the value of ERROR-BUFFER."
|
||||||
t)))
|
t)))
|
||||||
(let ((input-file (org-babel-temp-file "input-"))
|
(let ((input-file (org-babel-temp-file "input-"))
|
||||||
(error-file (if error-buffer (org-babel-temp-file "scor-") nil))
|
(error-file (if error-buffer (org-babel-temp-file "scor-") nil))
|
||||||
|
;; Unfortunately, `executable-find' does not support file name
|
||||||
|
;; handlers. Therefore, we could use it in the local case
|
||||||
|
;; only.
|
||||||
(shell-file-name
|
(shell-file-name
|
||||||
(if (file-executable-p
|
(cond ((and (not (file-remote-p default-directory))
|
||||||
(concat (file-remote-p default-directory) shell-file-name))
|
(executable-find shell-file-name))
|
||||||
shell-file-name
|
shell-file-name)
|
||||||
"/bin/sh"))
|
((file-executable-p
|
||||||
|
(concat (file-remote-p default-directory) shell-file-name))
|
||||||
|
shell-file-name)
|
||||||
|
("/bin/sh")))
|
||||||
exit-status)
|
exit-status)
|
||||||
;; There is an error in `process-file' when `error-file' exists.
|
;; There is an error in `process-file' when `error-file' exists.
|
||||||
;; This is fixed in Emacs trunk as of 2012-12-21; let's use this
|
;; This is fixed in Emacs trunk as of 2012-12-21; let's use this
|
||||||
|
|
Loading…
Reference in a new issue