I'm trying to use flymake to run pyflakes, as suggested here: http://www.emacswiki.org/cgi-bin/wiki/PythonMode#toc9
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:
- Installed pyflakes on the remote box.
- Customized my
tramp-remote-process-environment
variable so that pyflakes could be found in its PATH - Used a variant of the code from the wiki link above. Obviously I excluded the check that disables it for remote buffers. Also, the
(when (load "flymake" t) ...)
construct didn't seem to work as I expected, but I'm not too worried about that. - Re-defined (for test purposes -- advice should be fine if this can be made to work) the
flymake-start-syntax-check-process
function so that it usesstart-file-process
(which works with tramp) instead ofstart-process
(which doesn't).
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?
- Emacs 23.1 and 23.2 on Ubuntu
- Python 2.4.6
- Pyflakes 0.4.0 (via easy_install)