Reputation: 8433
I've been looking through the documentation and tried customizing and a variety of things, but no matter what I do it seems like Flymake just always places its temporary files into whatever directory the original file is in.
The main reason this is a big deal is because when I'm stepping through my programs using gdb, sometimes I step into an STL file, or other file in a non-user directory. Frequently this causes my gdb process to stop responding for some reason, which means that I have to go all the way back to the beginning and either globally disable Flymake or hope that I don't have to do another find-file in a dir that my emacs process doesn't have write access to.
Is there a good way to get flymake to always generate its temporary files in e.g. ~/.emacs.d/tmp
?
Upvotes: 9
Views: 1409
Reputation: 4010
Recent versions of Emacs only save "inplace". Here's a quick hack to save "intemp": http://blog.arithm.com/2011/01/27/save-_flymake-files-in-a-temporary-directory/
Upvotes: 6
Reputation: 1485
This works fine for me:
(setq temporary-file-directory "~/.emacs.d/tmp/")
Upvotes: 2
Reputation: 192487
Not sure, but for C#, flymake redefines the flymake-get-make-cmdline function.
It returns a string, the command line to run for flymake. I suppose you could modify that function to return whatever you want, including a command line that specifies temp file locations in some intelligent way, for whatever compiler you're running.
Upvotes: 0