I'm trying to use flymake to run pyflakes, as suggested here
This works fine for local files, and almost works with remote files with a bit of tweaking, but I'm left with a problem where flymake/pyflakes 'modifies' the buffer when it runs (although nothing actually seems to change), which renders it a bit useless in practice (e.g. saving a file runs flymake which immediately modifies the buffer again).
Here's what I did to almost get it working:
tramp-remote-process-environment
variable so that pyflakes could be found in its PATH(when (load "flymake" t) ...)
construct didn't seem to work as I expected, but I'm not too worried about that.flymake-start-syntax-check-process
function so that it uses start-file-process
(which works with tramp) instead of start-process
(which does not).The change in #4 does not appear to cause any issues when processing a local file, but although this now enables flymake to run the remote pyflakes for the remote files (errors are highlighted as expected), in this instance the buffer is 'modified' whenever flymake runs.
I'm guessing that start-file-process
, for remote processes, results in some additional return value/data that does not occur for local processes.
Does anyone have any insight/advice?
You need to tell flymake to create it's copy of the buffer somewhere locally, I prefer using the $TMP
directory since this also allows me to use tramp on files in directories I don't have write permissions to.
You may want to checkout my fork of flymake-python since it does all this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With