Jelajahi Sumber

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 tahun lalu
induk
melakukan
96d2e01e7d
1 mengubah file dengan 6 tambahan dan 2 penghapusan
  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