summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-01-09 13:11:12 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-01-09 13:11:12 (GMT)
commit1dd1b10d5a908ef302b76838931aefdab2d05f34 (patch)
tree3aa6c7319aebb06d587068a071d9b7bd7426a2b1
parent81959fc8c0607490eecab8ac540f36070e6722ad (diff)
parent79dd795fe4abb5fdcc1340194b25b958342b8c66 (diff)
downloadorg-mode-1dd1b10d5a908ef302b76838931aefdab2d05f34.zip
org-mode-1dd1b10d5a908ef302b76838931aefdab2d05f34.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/ob-eval.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el
index 5884d33..22d2bcf 100644
--- a/lisp/ob-eval.el
+++ b/lisp/ob-eval.el
@@ -137,11 +137,17 @@ specifies the value of ERROR-BUFFER."
t)))
(let ((input-file (org-babel-temp-file "input-"))
(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
- (if (file-executable-p
- (concat (file-remote-p default-directory) shell-file-name))
- shell-file-name
- "/bin/sh"))
+ (cond ((and (not (file-remote-p default-directory))
+ (executable-find shell-file-name))
+ shell-file-name)
+ ((file-executable-p
+ (concat (file-remote-p default-directory) shell-file-name))
+ shell-file-name)
+ ("/bin/sh")))
exit-status)
;; 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