Emacs 24 introduced the ability to disable the creation of the infamous .#file-name lock files.

Evaluating the following lisp form will completely disable Emacs ability to lock files to prevent concurrent changes.

Is there a way to set Emacs to save lock files in a dedicated directory, similarly to what happens with auto-save and backup files?

(setq create-lockfiles nil)
up vote 12 down vote accepted

I'm afraid this is not straightforward to do considering F1 v create-lockfiles takes you to filelock.c which only exposes this variable and temporary-file-directory. So, to have this behaviour you'd either need to replace nearly all functions exposed in that file with your own Emacs Lisp functions or hand in a bug via M-x report-emacs-bug and hope for the best.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.