Subject: bug#39563: default location of backup files

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 30 Aug 2021 03:22:06 +0200

Pedro Moreira <[email-masked]> writes:

> if a user edits a php file using emacs directly at the webserver,
> emacs automatically saves a temp file at the same location, for
> example the user opens index.php, emacs stores a copy index.php~.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

You can make Emacs save backup files somewhere else, like this, for
instance:

(setq backup-directory-alist
      '((".*" . "~/.emacs.d/aux/")))

While it's a concern that you could expose data if you're editing your
running php files directly, I don't there's anything much Emacs can do
to auto-detect that.  So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no