Emacs creates an autosave file named ##

I configured Emacs to send autosaves to the / tmp directory:

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

However, when editing the Foo file, instead of creating # Foo #, it creates ## - only two hashes. This causes the warning “Bar has autosave data” every time I open a new file, since the file / tmp / ## seems to match all possible file names. I assume that I am incorrectly changing the variable auto-save-file-name-transforms; what should I install to create / tmp / # foo # autosaves? (Or, conversely, what else do I need to change?)

Perhaps relevant information:

  • Emacs 21.4.1
  • RHEL 5.3 (Tikanga)
  • Most of my files are controlled by git versions
  • vc-make-backup-files is nil (but setting it to t does not change the behavior)
+4
source share
1 answer

You can use something like this See the second section from Amit Patel

0
source

Source: https://habr.com/ru/post/1536996/


All Articles