When I change the buffer, Emacs automatically creates a temporary symlink in the same directory as the edited file (for example, foo.c):
.
where '12345' is the PID of Emacs' (I don't know what the last number means).
Why is Emacs creating these links and how can I prevent this?
Please note that I turned off the automatic save mode ( Mx auto-save-mode ) and disabled the backup files ( Mx set-variable -> make-backup-files -> nil ). When I save the modified buffer or cancel the changes, the symbolic link disappears.
In particular, I am trying to prevent Emacs from creating these links because they cause a change in the directoryโs timestamp, which forces our build system to rebuild the entire module instead of compiling and linking for one changed file: /
Thanks for any input!
Update. In order for Emacs to constantly create blocking files, you can modify src/filelock.c and create your own binary file:
void lock_file (fn) Lisp_Object fn; { return;
Update 2: Arne's answer is correct. You can now disable the lock files in the latest version of Emacs (24.3.1) by adding this to your .emacs file:
(setq create-lockfiles nil)
emacs
Daniel Schuler Apr 21 2018-11-11T00: 00Z
source share