GNU bug report logs - #64791
30.0.50; [PATCH] Fix dired mismatch on some filenames

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Sat, 22 Jul 2023 13:24:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Fixed in version 30.1

Done: Manuel Giraud <manuel <at> ledu-giraud.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: 64791 <at> debbugs.gnu.org, manuel <at> ledu-giraud.fr
Subject: bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames
Date: Sun, 03 Sep 2023 14:44:38 +0300
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 3 Sep 2023 04:34:38 -0700
> Cc: Manuel Giraud <manuel <at> ledu-giraud.fr>, 64791 <at> debbugs.gnu.org
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> >> Cc: 64791 <at> debbugs.gnu.org
> >> Date: Sat, 22 Jul 2023 16:46:27 +0200
> >>
> >> Eli Zaretskii <eliz <at> gnu.org> writes:
> >>
> >> > I'm not sure there can be the end to such fixes.  The real fix is to
> >> > use GNU 'ls' which has special support for Dired (or use ls-lisp.el).
> >> > I guess you don't have GNU 'ls', since you are on OpenBSD?
> 
> Yup.  Perhaps we should consider checking for the existence of "gls" and
> using that.  E.g., I use the following, here:
> 
>   (if (and (memq system-type '(berkeley-unix darwin))
>            (executable-find "gls"))
>       (setq insert-directory-program "gls"))
> 
> But I've only tested this on macOS so far, so I'm not sure how well this
> would work on *BSD.  From memory, I think it should be fine.  Perhaps
> Manuel can say what he thinks.
> 
> >> You're right I'm using OpenBSD's ls.  But I thought it was a reasonable
> >> fix: it seems more obvious then looking for something that looked like a
> >> file size.
> >
> > Maybe.  Let's hear what others think about this.
> 
> FWIW, I don't think I mind such portability fixes.  It wouldn't be a bad
> thing if Dired played a bit more nicely on BSD machines.
> 
> The point that this could be a slippery slope is valid, but we can also
> choose to reject further tweaks on a case-by-case basis.  The format of
> ls is also inherently stable: many things depend on it.
> 
> On the other hand, the fix I propose above might be all that is needed
> in many cases.

I'm still undecided.  And it doesn't help that none of *BSD users
except you spoke up.




This bug report was last modified 1 year and 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.