forked from mirrors/org-mode
babel: call-process-region-original is no longer a free variable
* lisp/babel/ob.el (org-babel-execute-src-block): call-process-region-original is no longer free (org-babel-org-babel-call-process-region-original): call-process-region-original is no longer free and is now renamed org-babel-call-process-region-original (org-babel-tramp-handle-call-process-region): call-process-region-original is no longer free
This commit is contained in:
parent
ea8565e2ed
commit
2dc30adf15
|
@ -251,8 +251,8 @@ block."
|
||||||
(dir (cdr (assoc :dir params)))
|
(dir (cdr (assoc :dir params)))
|
||||||
(default-directory
|
(default-directory
|
||||||
(or (and dir (file-name-as-directory dir)) default-directory))
|
(or (and dir (file-name-as-directory dir)) default-directory))
|
||||||
(call-process-region-original
|
(org-babel-call-process-region-original
|
||||||
(if (boundp 'call-process-region-original) call-process-region-original
|
(if (boundp 'org-babel-call-process-region-original) org-babel-call-process-region-original
|
||||||
(symbol-function 'call-process-region)))
|
(symbol-function 'call-process-region)))
|
||||||
(indent (car (last info)))
|
(indent (car (last info)))
|
||||||
result)
|
result)
|
||||||
|
@ -279,7 +279,7 @@ block."
|
||||||
result result-params info new-hash indent lang)
|
result result-params info new-hash indent lang)
|
||||||
(run-hooks 'org-babel-after-execute-hook)
|
(run-hooks 'org-babel-after-execute-hook)
|
||||||
result))
|
result))
|
||||||
(setq call-process-region 'call-process-region-original))))
|
(setq call-process-region 'org-babel-call-process-region-original))))
|
||||||
|
|
||||||
(defun org-babel-expand-body:generic (body params &optional processed-params)
|
(defun org-babel-expand-body:generic (body params &optional processed-params)
|
||||||
"Expand a block of code with org-babel according to it's header
|
"Expand a block of code with org-babel according to it's header
|
||||||
|
@ -1409,6 +1409,7 @@ of the string."
|
||||||
(org-babel-chomp (org-babel-reverse-string string) regexp))
|
(org-babel-chomp (org-babel-reverse-string string) regexp))
|
||||||
regexp))
|
regexp))
|
||||||
|
|
||||||
|
(defvar org-babel-org-babel-call-process-region-original nil)
|
||||||
(defun org-babel-tramp-handle-call-process-region
|
(defun org-babel-tramp-handle-call-process-region
|
||||||
(start end program &optional delete buffer display &rest args)
|
(start end program &optional delete buffer display &rest args)
|
||||||
"Use tramp to handle call-process-region. Fixes a bug in
|
"Use tramp to handle call-process-region. Fixes a bug in
|
||||||
|
@ -1422,9 +1423,9 @@ of the string."
|
||||||
;; bug in tramp
|
;; bug in tramp
|
||||||
(apply 'process-file program tmpfile buffer display args)
|
(apply 'process-file program tmpfile buffer display args)
|
||||||
(delete-file tmpfile)))
|
(delete-file tmpfile)))
|
||||||
;; call-process-region-original is the original emacs definition. It
|
;; org-babel-call-process-region-original is the original emacs definition. It
|
||||||
;; is in scope from the let binding in org-babel-execute-src-block
|
;; is in scope from the let binding in org-babel-execute-src-block
|
||||||
(apply call-process-region-original
|
(apply org-babel-call-process-region-original
|
||||||
start end program delete buffer display args)))
|
start end program delete buffer display args)))
|
||||||
|
|
||||||
(defun org-babel-maybe-remote-file (file)
|
(defun org-babel-maybe-remote-file (file)
|
||||||
|
|
Loading…
Reference in New Issue