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: Wed, 16 Mar 2016 14:35:31 -0700

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.

In particular, for me this caused the following issue:
https://github.com/commercialhaskell/stack/issues/1897

It seems wrong up for emacs to be writing files that have the extension
'.cabal' that are not cabal files. Even if they are named pipes that start
with '.', this causes problems for tools that expect files to be what their
name says they are.

Contrast this with backup files, which append a tilda to the end of the
filepath.  This changes the extension, and so tools don't get confused
by the extra files.

Version info:

In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2015-09-10 on computer
Repository revision: 866501efe0fdc0c29448e0aaf8696eb0a3c8fcd6

-Michael

reply via email to

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