summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Berry <ccberry@ucsd.edu>2016-04-23 21:18:10 -0700
committerCharles Berry <ccberry@ucsd.edu>2016-05-10 18:22:03 -0700
commit779222eba5463057d17d0b7a65f850b123f3a24c (patch)
tree2b2648702b1858881db85956dd3a48dbbeb903da
parent9210300260031aa1612dd7e16ff13f80b0b05180 (diff)
downloadorg-mode-779222eba5463057d17d0b7a65f850b123f3a24c.tar.gz
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.
-rw-r--r--lisp/ob-comint.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index c7c0327..34fcbae 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -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)