I've noticed that monroe-load-file doesn't work when connecting to a remote nREPL server and editing files remotely via TRAMP. We get an error, assuming I'm editing "foor/bar/time.clj" on a remote host. (Paths are redacted btw, in case they don't look valid)
foor.core=> Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
/ssh:user@foobar:/home/ubuntu/project/foor/bar/time.clj (No such file or directory)
There's multiple ways to fix this it seems, but this function tramp-compat-file-local-name is the most suitable and it transparently handles local file paths:
According to Emacs docs "TRAMP is included as part of Emacs (since Emacs 22.1)." so we should be safe to include this and not break anything for people not using TRAMP.
I've noticed that
monroe-load-file
doesn't work when connecting to a remote nREPL server and editing files remotely via TRAMP. We get an error, assuming I'm editing "foor/bar/time.clj" on a remote host. (Paths are redacted btw, in case they don't look valid)There's multiple ways to fix this it seems, but this function
tramp-compat-file-local-name
is the most suitable and it transparently handles local file paths:According to Emacs docs "TRAMP is included as part of Emacs (since Emacs 22.1)." so we should be safe to include this and not break anything for people not using TRAMP.