ob-comint.el: Require `tramp' and declare tramp functions
* ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file): The tramp macro `with-parsed-tramp-file-name' invokes a bunch of tramp functions. These are now declared and tramp is explicitly required.
This commit is contained in:
parent
9210300260
commit
779222eba5
|
@ -33,9 +33,16 @@
|
|||
(require 'ob-core)
|
||||
(require 'org-compat)
|
||||
(require 'comint)
|
||||
(eval-when-compile (require 'cl))
|
||||
(declare-function with-parsed-tramp-file-name "tramp" (filename var &rest body))
|
||||
(eval-when-compile
|
||||
(require 'cl))
|
||||
(require 'tramp)
|
||||
(declare-function tramp-flush-directory-property "tramp-cache" (vec directory))
|
||||
(declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
|
||||
(declare-function tramp-file-name-method "tramp" (vec))
|
||||
(declare-function tramp-file-name-user "tramp" (vec))
|
||||
(declare-function tramp-file-name-host "tramp" (vec))
|
||||
(declare-function tramp-file-name-localname "tramp" (vec))
|
||||
(declare-function tramp-file-name-hop "tramp" (vec))
|
||||
|
||||
(defun org-babel-comint-buffer-livep (buffer)
|
||||
"Check if BUFFER is a comint buffer with a live process."
|
||||
|
@ -151,9 +158,8 @@ FILE exists at end of evaluation."
|
|||
(if (= (aref string (1- (length string))) ?\n) string (concat string "\n")))
|
||||
;; From Tramp 2.1.19 the following cache flush is not necessary
|
||||
(if (file-remote-p default-directory)
|
||||
(let (v)
|
||||
(with-parsed-tramp-file-name default-directory v
|
||||
(tramp-flush-directory-property v ""))))
|
||||
(with-parsed-tramp-file-name default-directory nil
|
||||
(tramp-flush-directory-property v "")))
|
||||
(while (not (file-exists-p file)) (sit-for (or period 0.25))))
|
||||
|
||||
(provide 'ob-comint)
|
||||
|
|
Loading…
Reference in New Issue