Emacs creates autosave file named ##

I have 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 file Foo, instead of creating #Foo#, it creates ## - just two hashes. This then causes the warning "Bar has autosave data" every time I open a new file, since the /tmp/## file apparently pattern-matches every possible filename. I assume I'm setting the auto-save-file-name-transforms variable wrong; what should I set it to to create /tmp/#Foo# autosaves? (Or alternatively, what else do I need to change?)

Possibly relevant information:

  • Emacs 21.4.1
  • RHEL 5.3 (Tikanga)
  • Most of my files are version-controlled by git
  • vc-make-backup-files is nil (but setting it to t doesn't change the behaviour)

  • 你可以使用类似这样的内容参见Amit Patel的第二部分

    链接地址: http://www.djcxy.com/p/38560.html

    上一篇: Emacs自动备份:文件名+ DATE.org

    下一篇: Emacs创建名为##的自动保存文件