Ver código fonte

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 anos atrás
pai
commit
96d2e01e7d
1 arquivos alterados com 6 adições e 2 exclusões
  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