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: Sat, 9 Nov 2019 16:37:45 -0700 Message-ID: References: <8jy49fnrpl.fsf@fencepost.gnu.org> <87pni3t129.fsf@marxist.se> <83eeyicxh7.fsf@gnu.org> <875zjutq51.fsf@marxist.se> <83imnta3y6.fsf@gnu.org> <83d0e19zcm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000dcdc240596f264c8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="77841"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Stefan Kangas , 23033@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 10 00:39: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 1iTaK0-000K9j-CI for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Nov 2019 00:39:12 +0100 Original-Received: from localhost ([::1]:40362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTaJy-0006T7-Lr for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Nov 2019 18:39:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39719) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTaJs-0006Ss-7W for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2019 18:39:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTaJq-0007d5-8R for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2019 18:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41667) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTaJq-0007cx-5g for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2019 18:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iTaJq-0001pV-1t for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2019 18:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Sloan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2019 23:39:02 +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.15733427106980 (code B ref 23033); Sat, 09 Nov 2019 23:39:02 +0000 Original-Received: (at 23033) by debbugs.gnu.org; 9 Nov 2019 23:38:30 +0000 Original-Received: from localhost ([127.0.0.1]:50484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTaJJ-0001oV-Px for submit@debbugs.gnu.org; Sat, 09 Nov 2019 18:38:30 -0500 Original-Received: from mail-qv1-f49.google.com ([209.85.219.49]:36546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTaJH-0001oI-OP for 23033@debbugs.gnu.org; Sat, 09 Nov 2019 18:38:28 -0500 Original-Received: by mail-qv1-f49.google.com with SMTP id f12so3615472qvu.3 for <23033@debbugs.gnu.org>; Sat, 09 Nov 2019 15:38:27 -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=vKEywhx0UOvBoWT9seLQxZLiHZcRKgBQoSNSlgYkdiw=; b=ev/VY6v4azfExgHWohHHLF8nx8nH8/YPq9jS3Hq2Ay/Qx6OmcdQcJ0z8gzFAwQMRQC NV5yE/GJzZKGbYIdqsAAzqwpQgxQ3+KMsAwhbdPToEADJvrMiWth5hLhtUOXgbfD2TGR vgW1wUb1FhxZ35sd6b9QXnS2foqMNb6ixYY3TlD57G0GALRx1ZRAQkG0X+L5TWEIU5c2 KidjqGzvXEAkI83s7ndFsgFoHOwEPi7Rf+S608oxFA3QGGQrKFXn5BobFf8tH5tl89yv 86D83HiBNmSpD3RjfNeHkyjLJSXc2Izx5f6udpRtqCF3DmJIwpCPKiHqyPumADhO5rL6 I6fw== 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=vKEywhx0UOvBoWT9seLQxZLiHZcRKgBQoSNSlgYkdiw=; b=KGWD+S7ONorFYTadvg9mXwrpPObTAJVmfv2MQN/imPjkPbm6uJq9R8Lvrqn+Hdk2/X tOoZJLeIjwmdQ8meDs4FUcbiMPeWGjz4FPuV9I0Q831GGV9fvCHuc5HvTozmfbR7FO97 heK1bL6vTNLLwaTDhhEkMcLsMdzx0Su+3xmJO4i4b5cire/G4EAwkiBgQ9/C9WGzN2Df OUIu45P/GuxJoDD6Ca1WEtVT10yc/cE1a8kAP3FtwvXhzFA8pTJ3fybTlDEvHmc7K9ft vRfx8n/O0EuLxlDNP4/dJKT84plPJ5Y1/Aq1VnV5Zdc8zIueKzIMyOV8bmHCCm2sUFRK GcCA== X-Gm-Message-State: APjAAAUxiDxjYBykC7fj9TSTbG549si4xIwJgybZMdiq4/Njh4aZSQlo RnYJnh3AHTTe3PgP8akEvqrdIwnhlL29br8R5UHgTCtcO6s= X-Google-Smtp-Source: APXvYqyS4Lsnqx0h9lfG6ywciVD6WaM7QIst4kFEUSbtRj68Mg7pvhj53lvopd0VUP0VH7blahrtntNE9L795u5TA3Q= X-Received: by 2002:a0c:d4ba:: with SMTP id u55mr17029903qvh.40.1573342701999; Sat, 09 Nov 2019 15:38:21 -0800 (PST) In-Reply-To: <83d0e19zcm.fsf@gnu.org> 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:171367 Archived-At: --000000000000dcdc240596f264c8 Content-Type: text/plain; charset="UTF-8" Since sort order is lexicographic, lock files with ".lock" appended will still typically be next to the files when listed. The only exception I can think of is if there are other related files with the same base name, perhaps with a different stacked extension or suffix (like ~) It is not the case that the current lock file names are always listed next to the files they are clocking: mgsloan@treetop:~/test$ ls -la total 8 drwxrwxr-x 2 mgsloan mgsloan 4096 Nov 9 16:36 . drwxr-xr-x 57 mgsloan mgsloan 4096 Nov 9 16:35 .. -rw-rw-r-- 1 mgsloan mgsloan 0 Nov 9 16:36 .#test.md -rw-rw-r-- 1 mgsloan mgsloan 0 Nov 9 16:36 '#.test.md' -rw-rw-r-- 1 mgsloan mgsloan 0 Nov 9 16:35 test.md On Sat, Nov 9, 2019 at 2:24 AM Eli Zaretskii wrote: > > From: Stefan Kangas > > Date: Sat, 9 Nov 2019 10:12:11 +0100 > > Cc: Michael Sloan , Glenn Morris , > 23033@debbugs.gnu.org > > > > > I think we should only consider adding punctuation characters, because > > > that would ensure these lock files are displayed right next to the > > > files they lock, like today. Moving the lock files away of the files > > > they lock in the directory listing would be a disadvantage, IMO. > > > > On this MacOS machine, I see the following: > > > > $ ls -al > > total 8 > > drwxr-xr-x 11 skangas staff 352 Nov 9 10:05 . > > lrwxr-xr-x 1 skangas staff 33 Nov 9 10:05 .#foo -> > > skangas@example.org.795 > > drwxr-xr-x 50 skangas staff 1600 Nov 9 10:03 .. > > -rw-r--r-- 1 skangas staff 0 Nov 9 10:03 a > > -rw-r--r-- 1 skangas staff 0 Nov 9 10:03 e > > -rw-r--r-- 1 skangas staff 3 Nov 9 10:05 foo > > -rw-r--r-- 1 skangas staff 0 Nov 9 10:03 i > > -rw-r--r-- 1 skangas staff 0 Nov 9 10:03 z > > > > In other words, the lock file is not next to the file it locks. Are > > you seeing something else? > > Yes. > > Is the above Gnu 'ls'? And what is your locale? > > > How would the ordering differ with a suffix like ".lock" compared to > > "#" or some other punctuation character? I would have thought that it > > would be very similar. Maybe I'm missing something. > > The default file sort order in UTF-8 locales ignores punctuation > characters. > --000000000000dcdc240596f264c8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Since sort order is lexicographic, lock files with ".= lock" appended will still typically be next to the files when listed.= =C2=A0 The only exception I can think of is if there are other related file= s with the same base name, perhaps with a different stacked extension or su= ffix (like ~)

It is not the case that the current lock f= ile names are always listed next to the files they are clocking:
=
mgsloan@treetop:~/test$ ls -la =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
total 8 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
drwxrwxr-x =C2=A02 mgsloan= mgsloan 4096 Nov =C2=A09 16:36 =C2=A0. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
drwxr-xr-x 57 mgsloan mgsloan 4096 Nov = =C2=A09 16:35 =C2=A0..
-rw-rw-r-- =C2=A01 mgsloan mgsloan =C2=A0 =C2=A00= Nov =C2=A09 16:36 =C2=A0.#test.md
-rw-rw-r-- =C2=A01 mgsloan mgsloan = =C2=A0 =C2=A00 Nov =C2=A09 16:36 '#.test.md'
-rw-rw-r-- =C2=A01 = mgsloan mgsloan =C2=A0 =C2=A00 Nov =C2=A09 16:35 =C2=A0test.md

On = Sat, Nov 9, 2019 at 2:24 AM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Stefan Kangas <stefan@marxist.se>
> Date: Sat, 9 Nov 2019 10:12:11 +0100
> Cc: Michael Sloan <mgsloan@gmail.com>, Glenn Morris <rgm@gnu.org>, 23033@debbugs.gnu.org
>
> > I think we should only consider adding punctuation characters, be= cause
> > that would ensure these lock files are displayed right next to th= e
> > files they lock, like today.=C2=A0 Moving the lock files away of = the files
> > they lock in the directory listing would be a disadvantage, IMO.<= br> >
> On this MacOS machine, I see the following:
>
> $ ls -al
> total 8
> drwxr-xr-x=C2=A0 11 skangas=C2=A0 staff=C2=A0 =C2=A0352 Nov=C2=A0 9 10= :05 .
> lrwxr-xr-x=C2=A0 =C2=A01 skangas=C2=A0 staff=C2=A0 =C2=A0 33 Nov=C2=A0= 9 10:05 .#foo ->
> skangas@example.org.795
> drwxr-xr-x=C2=A0 50 skangas=C2=A0 staff=C2=A0 1600 Nov=C2=A0 9 10:03 .= .
> -rw-r--r--=C2=A0 =C2=A01 skangas=C2=A0 staff=C2=A0 =C2=A0 =C2=A00 Nov= =C2=A0 9 10:03 a
> -rw-r--r--=C2=A0 =C2=A01 skangas=C2=A0 staff=C2=A0 =C2=A0 =C2=A00 Nov= =C2=A0 9 10:03 e
> -rw-r--r--=C2=A0 =C2=A01 skangas=C2=A0 staff=C2=A0 =C2=A0 =C2=A03 Nov= =C2=A0 9 10:05 foo
> -rw-r--r--=C2=A0 =C2=A01 skangas=C2=A0 staff=C2=A0 =C2=A0 =C2=A00 Nov= =C2=A0 9 10:03 i
> -rw-r--r--=C2=A0 =C2=A01 skangas=C2=A0 staff=C2=A0 =C2=A0 =C2=A00 Nov= =C2=A0 9 10:03 z
>
> In other words, the lock file is not next to the file it locks.=C2=A0 = Are
> you seeing something else?

Yes.

Is the above Gnu 'ls'?=C2=A0 And what is your locale?

> How would the ordering differ with a suffix like ".lock" com= pared to
> "#" or some other punctuation character?=C2=A0 I would have = thought that it
> would be very similar.=C2=A0 Maybe I'm missing something.

The default file sort order in UTF-8 locales ignores punctuation
characters.
--000000000000dcdc240596f264c8--