From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Sloan Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <8jy49fnrpl.fsf@fencepost.gnu.org> <87pni3t129.fsf@marxist.se> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f28e140596cfbd30" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152454"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 23033@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 08 07:19:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSxbz-000dXf-N5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2019 07:19:11 +0100 Original-Received: from localhost ([::1]:50142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSxby-0005Ps-8q for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2019 01:19:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59019) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSxbr-0005Pb-GO for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 01:19:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSxbq-00054X-2Q for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 01:19:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35673) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSxbp-00054R-Tt for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 01:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iSxbp-0000uG-Nc for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 01:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Sloan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Nov 2019 06:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23033 X-GNU-PR-Package: emacs Original-Received: via spool by 23033-submit@debbugs.gnu.org id=B23033.15731938823406 (code B ref 23033); Fri, 08 Nov 2019 06:19:01 +0000 Original-Received: (at 23033) by debbugs.gnu.org; 8 Nov 2019 06:18:02 +0000 Original-Received: from localhost ([127.0.0.1]:44494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSxar-0000se-62 for submit@debbugs.gnu.org; Fri, 08 Nov 2019 01:18:01 -0500 Original-Received: from mail-qk1-f170.google.com ([209.85.222.170]:38950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iSxap-0000sL-7W for 23033@debbugs.gnu.org; Fri, 08 Nov 2019 01:17:59 -0500 Original-Received: by mail-qk1-f170.google.com with SMTP id 15so4294673qkh.6 for <23033@debbugs.gnu.org>; Thu, 07 Nov 2019 22:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iPPSVmMRMWpZXqVmXoVU4xQd0feoHXnM7N7JAHSyTpc=; b=vMaEis8IBJPiHDGmTt/cc6+FJAE6/AUT7zv7yYfQcBYczuKL200iYJoHL9XY5beMPt 4gGGKO3acFYHK928JyZ+wriKsuShZaDO5VfKDHtwtblOWPg8f6/flnHAd4HvWgkyklBe 4UHp3FtQd7yyIYqddZo6qPpD+VbyOp4ujYGQfhFx2p4hgObY0LLGxi/GQgk7yDdTYMoM dVbaXURh2p+Rs1oiItWYjDeSU6neoDxcVaTOMV7vjApnlZ+QahxoAZJZ1L7yB7vTK96i KRSKLzmFj4zTsIE/heEb8IuMBv1NNPmUqcwMw7IoG55pa/Cg0dWL+Rwm+tD/yP95QyHm ICsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iPPSVmMRMWpZXqVmXoVU4xQd0feoHXnM7N7JAHSyTpc=; b=J/6ng6M5YjpAJVAg29N7L2qRZ484ZyzT80QVCdnXBbnFEdjJh62Hdv4H0c+EEjqNOC 7wuqhQtkIRLtYOpIi2zc47Bm4FFuzBnUT8Npz0yGcqOqx9qAPOBELo7V8tfmB2VRPQEY cHdOQKly9s3MymPJ1Vi6ymcffgDHN3lY2nyi7ApHY0r1fxNPHNu7xljUsby+LTSv1l/r ckovTemNcZTM+VdvEfH/qgc6CV4UC0KBH32AXmTFRPXBL4nXZFLnbXjVeU11FHVqzVzw AxL0JtpInau3AQQNCYD0UlRzlCU10EvBN87p/3UergB0/RFRx4ah1eal3Yq5JdXBWQ7Q kN7g== X-Gm-Message-State: APjAAAU2f00xYPOmetzbD0cKkP4vPqkGVGEi6fibwDV6XaowWzA2SXXN Y7GFawKSmH5HvJBM2TF2D23LFiVpSht2uVwxVdo= X-Google-Smtp-Source: APXvYqyqY8rsYNGcUsr5SgeMVdMzLM7A/zr2P3AM9nLNHXFSVIL5WiLolhu3mFpHedIyfRrxMsIfVw6I6Z2vdOFwRMc= X-Received: by 2002:a37:c247:: with SMTP id j7mr7197329qkm.67.1573193872738; Thu, 07 Nov 2019 22:17:52 -0800 (PST) In-Reply-To: <87pni3t129.fsf@marxist.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171170 Archived-At: --000000000000f28e140596cfbd30 Content-Type: text/plain; charset="UTF-8" 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 wrote: > Glenn Morris 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 > --000000000000f28e140596cfbd30 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Correct, it is easy to fix in the tens of thousands of pla= ces where it can cause misbehavior :)=C2=A0 But it is probably easier to fi= x it one place.

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

*=C2=A0https://github.com/joeyespo/pyte= st-watch/issues/68

Searching for emacs "= lockfile" yields 733 results -=C2=A0https://github.com/search?q= =3Demacs+"lockfile"&type=3DIssues=C2=A0-=C2=A0here are so= me relevant ones:
-Michael

=
On Thu, Nov 7, 2019 at 10:00 PM Stefa= n Kangas <stefan@marxist.se>= wrote:
Glenn Mo= rris <rgm@gnu.org&g= t; 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'.=C2=A0 This means that naive enumeration of al= l the files in the
>> directory with the extension '.hs' will also yield the loc= kfile.=C2=A0 Many
>> tools have behaviors that rely on enumerating all of the files whi= ch
>> 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<= br> > 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.=C2=A0 IOW, if this is not a big change, it could be worth doing it.=C2=A0 But it is mostly
cosmetic.

Best regards,
Stefan Kangas
--000000000000f28e140596cfbd30--