From 779222eba5463057d17d0b7a65f850b123f3a24c Mon Sep 17 00:00:00 2001 From: Charles Berry Date: Sat, 23 Apr 2016 21:18:10 -0700 Subject: [PATCH] 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. --- lisp/ob-comint.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el index c7c032781..34fcbaedf 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) -- 2.11.4.GIT