1

I use the configuration to store auto-save files in /tmp:

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

Emacs seems to create the auto-save-files with the actual permissions of the file changed. I would like to change the umask for auto-save files to 700. How to configure this?

ceving
  • 1,308
  • 1
  • 14
  • 28

1 Answers1

1

Put this in init.el to configure the default permissions of all newly created files:

(set-default-file-modes ?\700)

To apply this only to auto-save files I think you could use around advice on make-auto-save-file-name combined with default-file-modes to first store old default permissions, then set new ones, then run the advised function, and finally reset the old default permissions.

orgtre
  • 1,012
  • 4
  • 15