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.
This commit is contained in:
Dan Davison 2010-02-27 14:22:13 -05:00
parent 322fe431c5
commit 44c8487e2d
1 changed files with 3 additions and 1 deletions

View File

@ -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)