bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains


From: Juri Linkov
Subject: bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains
Date: Wed, 30 Jun 2021 22:31:33 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> For auto-save files, that's auto-save-file-name-transforms.
> For backup files, that's backup-directory-alist.
> For lock files, they can be switched off with create-lockfiles.
>
> Would it make sense to allow the user to control where the lockfiles are
> written?  The lockfiles are symlinks, so it should theoretically be
> possible to have them elsewhere without being any racier than the code
> currently is, I think.
>
> Any opinions?

This is a real problem.  To avoid syncing temporary files,
it's easy to add a pair of lines for every such directory:

  (add-to-list 'auto-save-file-name-transforms '("\\`/dir1/dir2/.*" "/tmp/" t))
  (add-to-list 'backup-directory-alist         '("\\`/dir1/dir2/.*" . "/tmp/"))

Then it creates temporary files whose names contain absolute paths:

  /tmp/!dir1/dir2!file~
  /tmp/#!dir1/dir2!file#

But currently no way to do the same for lock files, so need to take care
not to forget to add the same pattern in every .stignore in every sync directory
to ignore lock files that is extra trouble:

  .#*





reply via email to

[Prev in Thread] Current Thread [Next in Thread]