瀏覽代碼

lisp/ob-java.el: Fix java over tramp

* lisp/ob-java.el(org-babel-execute:java): Previously the source file
was always written to the local machine so execution on the remote
machine was not possible.  Now we write the source file to the remote
temp directory when the current directory is remote.
Ian Martins 4 年之前
父節點
當前提交
96d2e01e7d
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      lisp/ob-java.el

+ 6 - 2
lisp/ob-java.el

@@ -175,8 +175,12 @@ replaced in this string.")
                           (file-name-base fullclassname)))
          ;; the base dir that contains the top level package dir
          (basedir (file-name-as-directory (if run-from-temp
-                                              org-babel-temporary-directory
-                                            ".")))
+                                              (if (file-remote-p default-directory)
+                                                  (concat
+                                                   (file-remote-p default-directory)
+                                                   org-babel-remote-temporary-directory)
+                                                org-babel-temporary-directory)
+                                            default-directory)))
          ;; the dir to write the source file
          (packagedir (if (and (not run-from-temp) packagename)
                          (file-name-as-directory