corvus_carpe_noctem · 2022-05-01 22:20
I just started learning emacs, especially org mode. When I edit .org files and save it, .org\~ is created in the same directory and I am not sure what this file is. I can't find any info about it. What is the point of .org\~ file? I think it is the original file but what can I do so that .org\~ files aren't created
wanderlust0dev · 2022-05-01 22:42
Those are backup files.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Backup-Files.html
I generally create a backup directory and dump the files in there in case I need them. I’ve never actually needed them but space is cheap.
dpoggio · 2022-05-01 22:47
See https://www.gnu.org/software/emacs/manual/html_node/emacs/Backup.html
char1zard4 · 2022-05-02 01:05
You can set the backup and auto-save directory to /tmp/ pretty easily:
```elisp
;; Store all backup and autosave files in the tmp dir
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
```