Subject: bug#31908: Save file locks in centralized location

From: Radon Rosborough <[email-masked]>
Date: Tue, 19 Jun 2018 22:41:13 -0600

While you have an unsaved buffer, Emacs creates a lock file [1] in the
current directory. This is useful to prevent concurrent edits, but it
is also annoying to have the extra file around: for example, if you
save frequently while you have a Dired pane with a fast Auto Revert
enabled in another window, the lock file will keep appearing and
disappearing rapidly.

I wish for Emacs to save its lock files in some subdirectory of my
`user-emacs-directory', rather than in the same directory as the file
under consideration. Is that possible? If not, is it possible to
implement the feature someday?

I found no relevant discussion on the bug tracker or on emacs-devel,
and I only found the discouraging [2] on Stack Exchange.

[1]: https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Locks.html
[2]: https://emacs.stackexchange.com/q/5967/12534