GNU bug report logs - #31908
Save file locks in centralized location

Previous Next

Package: emacs;

Reported by: Radon Rosborough <radon.neon <at> gmail.com>

Date: Wed, 20 Jun 2018 04:43:01 UTC

Severity: wishlist

Tags: confirmed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31908 in the body.
You can then email your comments to 31908 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Wed, 20 Jun 2018 04:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Radon Rosborough <radon.neon <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 Jun 2018 04:43:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Radon Rosborough <radon.neon <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Save file locks in centralized location
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Wed, 20 Jun 2018 06:04:01 GMT) Full text and rfc822 format available.

Message #8 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Radon Rosborough <radon.neon <at> gmail.com>
Cc: bug-gnu-emacs <bug-gnu-emacs-bounces+psainty=orcon.net.nz <at> gnu.org>,
 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Wed, 20 Jun 2018 18:03:30 +1200
If users had their own custom location for locks, surely the locking
would cease to have any significant purpose, because no one would ever
see a lock created by someone else?

The utility would be reduced to preventing you from simultaneously
using multiple separate emacs instances to edit/write a given file.


-Phil





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Wed, 20 Jun 2018 15:31:02 GMT) Full text and rfc822 format available.

Message #11 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Radon Rosborough <radon.neon <at> gmail.com>
To: psainty <at> orcon.net.nz
Cc: bug-gnu-emacs-bounces+psainty=orcon.net.nz <at> gnu.org, 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Wed, 20 Jun 2018 09:29:26 -0600
> If users had their own custom location for locks, surely the locking
> would cease to have any significant purpose [...] The utility would
> be reduced to preventing you from simultaneously using multiple
> separate emacs instances to edit/write a given file.

I run a single-user system; preventing concurrent edits is the only
purpose of the locking mechanism for me. This feature would hardly
remove "any significant purpose" from it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Thu, 21 Jun 2018 08:35:01 GMT) Full text and rfc822 format available.

Message #14 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Radon Rosborough <radon.neon <at> gmail.com>
Cc: psainty <at> orcon.net.nz, bug-gnu-emacs-bounces+psainty=orcon.net.nz <at> gnu.org,
 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Thu, 21 Jun 2018 10:34:50 +0200
Radon Rosborough <radon.neon <at> gmail.com> writes:

>> If users had their own custom location for locks, surely the locking
>> would cease to have any significant purpose [...] The utility would
>> be reduced to preventing you from simultaneously using multiple
>> separate emacs instances to edit/write a given file.
>
> I run a single-user system; preventing concurrent edits is the only
> purpose of the locking mechanism for me. This feature would hardly
> remove "any significant purpose" from it.

If implemented, this feature would almost certainly be off by default,
so no existing users would end up being surprised.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Thu, 21 Jun 2018 16:03:01 GMT) Full text and rfc822 format available.

Message #17 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Radon Rosborough <radon.neon <at> gmail.com>
To: rpluim <at> gmail.com
Cc: psainty <at> orcon.net.nz, bug-gnu-emacs-bounces+psainty=orcon.net.nz <at> gnu.org,
 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Thu, 21 Jun 2018 10:01:43 -0600
> If implemented, this feature would almost certainly be off by
> default, so no existing users would end up being surprised.

That doesn't bother me in the slightest, and I agree with your
conclusion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Wed, 06 Feb 2019 18:53:01 GMT) Full text and rfc822 format available.

Message #20 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Mandracchia <mauromandracchia <at> gmail.com>
To: 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Wed, 6 Feb 2019 19:35:11 +0100
[Message part 1 (text/plain, inline)]
Is there any update on this?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Wed, 06 Feb 2019 19:41:02 GMT) Full text and rfc822 format available.

Message #23 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mauro Mandracchia <mauromandracchia <at> gmail.com>
Cc: 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Wed, 06 Feb 2019 21:39:41 +0200
> From: Mauro Mandracchia <mauromandracchia <at> gmail.com>
> Date: Wed, 6 Feb 2019 19:35:11 +0100
> 
> Is there any update on this?

Not that I know of, sorry.  Patches to implement this are welcome.




Added tag(s) confirmed. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 27 Dec 2021 03:13:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31908; Package emacs. (Sun, 23 Jan 2022 13:50:02 GMT) Full text and rfc822 format available.

Message #28 received at 31908 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Radon Rosborough <radon.neon <at> gmail.com>
Cc: 31908 <at> debbugs.gnu.org
Subject: Re: bug#31908: Save file locks in centralized location
Date: Sun, 23 Jan 2022 14:49:48 +0100
Radon Rosborough <radon.neon <at> gmail.com> writes:

> 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'm going through old bug reports that unfortunately weren't resolved
at the time.)

This has been fixed for Emacs 28 by the introduction of the
`lock-file-name-transforms' variable, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 31908 <at> debbugs.gnu.org and Radon Rosborough <radon.neon <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 23 Jan 2022 13:51:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 21 Feb 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.