Using perltidy on a remote host through Tramp #22
pierre-rouleau
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The perltidy support here is great. One thing is missing: ability to run the remote host's perltidy on a Perl file located on a remote host. At the moment if you run the perltidy commands on a Perl file located on a remote host (and accessed through Tramp) the perltidy executable is taken from the localhost. If there's none, the perltidy output is empty.
Being able to use the remote host executable file on a remote host file is often useful, specially when the local host does not have the required environment. In what I'm doing these days it happens quite often.
For instance, I wrote a command that allows me to run the remote host' perlcritic on the remote file I'm editing. It also uses the local perlcritic when the Perl file is local. See my
pel-perl-critic
function in https://github.com/pierre-rouleau/pel/blob/master/pel-perl.el#L45.The code ensure the
current-directory
is set according to the actual location of the file, uses tramp functions to determine if the file is remote, checks if perlcritic is present in the remote host by passing the second argument toexecutable-find
and ensures that the formatted command is made with the filename taken from the running host's perspective.I wonder if something like that could be done for the low level part of perltidy.
Beta Was this translation helpful? Give feedback.
All reactions