diff options
author | Dan Davison <davison@stats.ox.ac.uk> | 2010-02-27 14:22:13 -0500 |
---|---|---|
committer | Dan Davison <davison@stats.ox.ac.uk> | 2010-02-27 18:19:18 -0500 |
commit | 44c8487e2d30500bbb4bd9b8e7af2fad5610f89f (patch) | |
tree | 4f866636d4efa8b651f04f92b6ec81a10847e188 | |
parent | 322fe431c52c36e297b93c924db20b32fa20f785 (diff) | |
download | org-mode-44c8487e2d30500bbb4bd9b8e7af2fad5610f89f.tar.gz |
babel: fix bug with remote working directory
This change fixes a bug in the remote execution branch, involving the
way that org-babel-tramp-handle-call-process-region is used
to (conditionally) handle calls to call-process-region. When
org-babel-execute-src-block called itself recursively (e.g. when
resolving a reference to another src block), a circular binding of
symbols and values resulted.
-rw-r--r-- | contrib/babel/lisp/org-babel.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el index 45834b0..431134c 100644 --- a/contrib/babel/lisp/org-babel.el +++ b/contrib/babel/lisp/org-babel.el @@ -217,7 +217,9 @@ block." (dir (cdr (assoc :dir params))) (default-directory (or (and dir (if (string-match "/$" dir) dir (concat dir "/"))) default-directory)) - (call-process-region-original (symbol-function 'call-process-region)) + (call-process-region-original + (if (boundp 'call-process-region-original) call-process-region-original + (symbol-function 'call-process-region))) result) ;; (message "params=%S" params) ;; debugging (flet ((call-process-region (&rest args) |