Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
alanz opened this Issue · 3 comments

3 participants

@alanz

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

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

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

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
Something went wrong with that request. Please try again.