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

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

bug#23033: 24.5; Lock file uses the same extension as the file it's lock


From: Michael Sloan
Subject: bug#23033: 24.5; Lock file uses the same extension as the file it's locking
Date: Thu, 7 Nov 2019 23:17:16 -0700

Correct, it is easy to fix in the tens of thousands of places where it can cause misbehavior :)  But it is probably easier to fix it one place.

Here are some example issues I found searching for "emacs lockfile glob"  yields 22 results - https://github.com/search?q=emacs+lockfile+glob&type=Issues - here are some relevant ones:

https://github.com/joeyespo/pytest-watch/issues/68
https://github.com/joeyespo/pytest-watch/pull/101
https://github.com/broccolijs/broccoli/issues/233
https://github.com/michaelwayman/node-sass-chokidar/issues/24
https://github.com/lammps/lammps/issues/1111

Searching for emacs "lockfile" yields 733 results - https://github.com/search?q=emacs+"lockfile"&type=Issues - here are some relevant ones:

https://github.com/microsoft/TypeScript/issues/29461
https://github.com/jekyll/jekyll/issues/7888
https://github.com/lukaszb/nose-watch/issues/15
https://github.com/pylint-bot/pylint-unofficial/issues/367
https://github.com/michaelwayman/node-sass-chokidar/issues/74
https://github.com/karun012/arion/issues/30
https://github.com/ananthakumaran/tide/issues/320

It is common to list files by extension.  I'm sure that this is just the tip of the iceberg.

-Michael

On Thu, Nov 7, 2019 at 10:00 PM Stefan Kangas <stefan@marxist.se> wrote:
Glenn Morris <rgm@gnu.org> writes:

> Michael Sloan wrote:
>
>> Lockfiles help the circumstance where multiple emacs processes are
>> editing the same file. The lockfile for 'File.hs' gets the name
>> '.#File.hs'.  This means that naive enumeration of all the files in the
>> directory with the extension '.hs' will also yield the lockfile.  Many
>> tools have behaviors that rely on enumerating all of the files which
>> have a particular extension, reasonably assuming that the user put them
>> there.
>
> It's very long-standing behaviour.
> So that we can assess how big the issue is, can you give some examples
> of the tools that have issues with this?
> As you say, it seems naive for a tool to simply find all files with a
> given extension, including dotfiles that are non-existent symlinks.
>
>> In particular, for me this caused the following issue:
>> https://github.com/commercialhaskell/stack/issues/1897
>
> Which you fixed the same day in the tool in question, right?

As much as I agree with the general sentiment above, one could also
consider users who are running e.g. 'find -iname "*.hs"' and are not
necessarily interested in seeing Emacs lock files.  IOW, if this is
not a big change, it could be worth doing it.  But it is mostly
cosmetic.

Best regards,
Stefan Kangas

reply via email to

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