reddit / emacs

How do I disable these backup file links?

myTerminal_ · 2022-03-21 17:59
I've been seeing strange behavior with my Emacs lately, such that it creates a link to a file that has unsaved changes. I have an example shown [here](https://imgur.com/a/VKwnOz3). I do have backups disabled using the below lines in my dotfiles: (setq backup-inhibited t) (setq auto-save-default nil) However, these only stop the backup files that start with a `~`, the kind that I'm seeing now, I haven't been able to find references for it on the web. Any pointers are highly appreciated.
hamnixster · 2022-03-21 18:28
There is a nice little package called [no-littering](https://github.com/emacscollective/no-littering) I use for this.
franburstall · 2022-03-21 18:47
These are lockfiles. They go away when you save the file. See section 18.3.4 of the manual for more.
myTerminal_ · 2022-03-21 18:57
Yes, they do go away as soon as I save the file, and that hasn't been a problem. My problem has been with my task runners that get triggered as soon as such files pop up in the directory and the task fails.
[deleted] · 2022-03-21 19:20
In that case you should set `create-lockfiles` to nil, either in your configuration or via a file/directory local variable.
[deleted] · 2022-03-21 19:23
[deleted]
myTerminal_ · 2022-03-21 21:07
That seems to do it! Happy cake day, BTW.
myTerminal_ · 2022-03-22 03:44
Looks interesting...