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. >