unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 64791@debbugs.gnu.org
Subject: bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames
Date: Sun, 03 Sep 2023 16:04:01 +0200	[thread overview]
Message-ID: <87ttsbbbfy.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <CADwFkmm9ByKe+C1asqfFLkSjSqV_nmUr0gDK-bW_BARqV6mFEQ@mail.gmail.com> (Stefan Kangas's message of "Sun, 3 Sep 2023 04:34:38 -0700")

Stefan Kangas <stefankangas@gmail.com> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>>> Cc: 64791@debbugs.gnu.org
>>> Date: Sat, 22 Jul 2023 16:46:27 +0200
>>>
>>> Eli Zaretskii <eliz@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.

It would work also on OpenBSD because GNU ls is also called "gls" in the
coreutils package here.  BTW, Could you reproduce this bug with default
ls on macOS?

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

Yes and I still think that this patch is reasonable even though someone
is using GNU ls.  It went "look for something that looks like a file
size" to "go directly after column 5 where the modification is
starting".  I find the former more error prone than the latter.

But maybe, I'm missing something about all the architectures (Unix and
non-Unix) that Emacs supports.
-- 
Manuel Giraud





  parent reply	other threads:[~2023-09-03 14:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22 13:22 bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-22 13:50 ` Eli Zaretskii
2023-07-22 14:46   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-22 15:24     ` Eli Zaretskii
2023-09-03 11:34       ` Stefan Kangas
2023-09-03 11:44         ` Eli Zaretskii
2023-09-03 14:04         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-09-03 18:18           ` Stefan Kangas
2023-09-03 18:24             ` Eli Zaretskii
2023-09-03 18:54               ` Stefan Kangas
2023-09-03 19:25                 ` Eli Zaretskii
2023-09-04  7:57                   ` Stefan Kangas
2023-09-04  8:05                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04  8:22                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04  8:36                       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-04 19:22                       ` Stefan Kangas
2023-09-05  0:20                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-05 21:57                           ` Stefan Kangas
2023-09-04 12:17                   ` Eli Zaretskii
2023-09-05 22:27                     ` Stefan Kangas
2023-09-05 22:43                       ` Stefan Kangas
2023-09-06 11:28                         ` Eli Zaretskii
2023-09-24 12:34                           ` Stefan Kangas
2023-09-24 15:32                             ` Eli Zaretskii
2023-09-25  9:39                               ` Stefan Kangas
2023-09-24 15:41                             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 15:56                               ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ttsbbbfy.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=64791@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).