views:

105

answers:

2

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?

A: 

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.

Cheeso
A: 

This works fine for me:

(setq temporary-file-directory "~/.emacs.d/tmp/")
Jonatan Lindén