Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure flymake to use specific directory for temp files?

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?

like image 585
quodlibetor Avatar asked Dec 06 '09 21:12

quodlibetor


2 Answers

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/

like image 184
nurikabe Avatar answered Sep 25 '22 17:09

nurikabe


This works fine for me:

(setq temporary-file-directory "~/.emacs.d/tmp/")
like image 21
Jonatan Lindén Avatar answered Sep 22 '22 17:09

Jonatan Lindén