flymake does not play nice with delete-trailing-space #78

alanz opened this Issue Sep 3, 2012 · 3 comments


None yet
3 participants

alanz commented Sep 3, 2012

If I add

(add-hook 'before-save-hook 'delete-trailing-whitespace)

to my .emacs it becomes difficult to edit, as the buffer is continuously being saved and deleting the trailing whitespace.

Would it be possible to modify ghc-save-buffer to call a hook which could have the delete-trailing-whitespace in it.

Or is it simpler to just run a separate process on the project to clean the files periodically?

mwotton commented May 3, 2013

I think this is a symptom of a deeper problem, which is that ghc-mod autosaves at all (which also messes with things like inotify plugins that run tests on file changes). My own suggestion would be to maintain a shadow directory under /tmp, and only autosave to there, but it's not a trivial change.

mwotton commented May 3, 2013

Whoops, i spoke too soon - if you use the version of ghc-mod from here or hackage, there's a change that saves the file to $foo_flymake.hs, which means this works fine, and this report can be closed. @kazu-yamamoto - any chance of a release to elpa so people can be exposed to the raw magnificence of ghc-mod without having to fiddle with .el files manually?


kazu-yamamoto commented May 8, 2013

Let's close this and move to #121.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment