backup - How to remove the temporary files starting and ending with '#' created by Emacs when it closes? -


when emacs closed modified buffers present, creates file format '#file_name#' recovery purpose in parent directory each modified buffer (except scratch).

when recover-file command used when emacs opens next time, modified buffer of file recovered. file #file_name# not deleted automatically.

this not occur if manually kill buffers before closing. bit tedious have use command kill-some-buffer or kill-matching buffer , 'yes' each of prompts 1 one.

is there simpler method overcome this? nice have solutions 1 or more of following.

  • prevent emacs creating recovery file modified buffer while closing

  • a simple command force kill buffers without prompt save

  • setting re-route recovery files different location (like ~/.emacs.d/)

(versions: emacs-24 on ubuntu-12.04 / os-x-10.9)

by adding following line on init.el file you'll disable auto-save feature , no more of these files generated

(setq auto-save-default nil) 

but may want files can use code above borrowed emacswiki

(setq backup-directory-alist       `((".*" . ,temporary-file-directory))) (setq auto-save-file-name-transforms       `((".*" ,temporary-file-directory t))) 

this cause backup files go temporary folder on operating system. check emacswiki link know more can feature

more on this


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -