all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: 62096@debbugs.gnu.org, stephen.berman@gmx.net, drew.adams@oracle.com
Subject: bug#62096: 30.0.50; find-dired, dired-goto-file and spaces
Date: Sat, 11 Mar 2023 18:09:37 +0100	[thread overview]
Message-ID: <m1o7ozw6y6.fsf@yahoo.es> (raw)
In-Reply-To: <87fsab75dn.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Sat,  11 Mar 2023 15:02:44 +0100")

Manuel Giraud <manuel@ledu-giraud.fr> writes:

> Hi,
>
> So here is a patch that should fix *BSD and macOS.  For Windows, I don't
> know if it is the right fix (so it does nothing on Windows, sorry Drew).
>
> I choose "-dgils" because FreeBSD, NetBSD and macOS man pages state the
> following about -ls switch for find(1):
> The format is identical to that produced by "ls -dgils".
>
> On OpenBSD, the find(1) man page says:
> The format is identical to that produced by "ls -dils".
>
> But the "-g" switch does not seems to do something different when the
> "-l" is present.

This is what I see on macOS:

$ find . -name "*.jpg" -ls
93775284        0 -rw-r--r--    1 dmartin          staff                   0 Mar 10 18:33 ./we needed space.jpg

$ ls -dgils *.jpg
93775284 0 -rw-r--r--  1 staff  0 Mar 10 18:33 we needed space.jpg
$ ls -dils *.jpg
93775284 0 -rw-r--r--  1 dmartin  staff  0 Mar 10 18:33 we needed space.jpg

The -g switch seems to add/remove the group column, despite the man page
saying that the switch has no effect.

As you can see, the output of find -ls on macOS really seems to match
the output of ls -dils better, which is in concordance with the OpenBSD
documentation.

>
> For testing without recompiling Emacs, one could evaluate this:
>
> (setq find-ls-option-default-ls
>   (cons "-ls" (if (or (eq system-type 'berkeley-unix)
>                       (eq system-type 'darwin))
>                   "-dgils"
>                 "-dilsb")))
>
>
> Daniel: I'd like to hear what it does on macOS.
>

I've tested your patch and it seems to work fine on macOS.  However,
users can install GNU findutils on macOS, and in those systems the bug
would still be present.

Is there a more reliable way to discern between GNU find and other find
implementations, without checking the system-type?

I know the GNU version of find supports --version, while the macOS find
returns an error, but I don't know how reliable that check would be.





  parent reply	other threads:[~2023-03-11 17:09 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 14:54 bug#62096: 30.0.50; find-dired, dired-goto-file and spaces Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 15:43 ` Drew Adams
2023-03-10 15:59   ` Stephen Berman
2023-03-10 17:10     ` Drew Adams
2023-03-10 18:07     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 18:37       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 20:48         ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 21:04           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11  0:14             ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 14:02               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 14:17                 ` Eli Zaretskii
2023-03-11 14:27                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17  7:49                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17  8:33                       ` Eli Zaretskii
2023-03-17  9:12                         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17 11:33                           ` Eli Zaretskii
2023-03-17 15:25                             ` Drew Adams
2023-03-17 15:41                               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17 16:14                                 ` Drew Adams
2023-03-17 16:26                               ` Eli Zaretskii
2023-03-17 17:20                                 ` Drew Adams
2023-03-17 17:50                                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17 18:56                                     ` Eli Zaretskii
2023-03-17 18:42                                   ` Eli Zaretskii
2023-03-17 17:54                             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-17 18:57                               ` Eli Zaretskii
2023-03-17 19:10                                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-18  6:34                                   ` Eli Zaretskii
2023-03-18 10:16                                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-12 10:54                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-12 11:32                     ` Eli Zaretskii
2023-03-12 11:56                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-12 17:51                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 17:09                 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-03-11 18:46                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 19:30                     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 21:31           ` Drew Adams
2023-03-10 21:43             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 12:00           ` Eli Zaretskii
2023-03-12 10:55           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-11 11:55         ` Eli Zaretskii
2023-03-11 14:12           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 19:05       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 19:55         ` Drew Adams
2023-03-10 20:42           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 21:24             ` Drew Adams
2023-03-10 21:32               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 21:45                 ` Drew Adams
2023-03-10 22:03                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-10 22:20                     ` Drew Adams
2023-03-11 11:58         ` Eli Zaretskii
2023-03-10 19:48       ` Drew Adams

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

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

  git send-email \
    --in-reply-to=m1o7ozw6y6.fsf@yahoo.es \
    --to=bug-gnu-emacs@gnu.org \
    --cc=62096@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=manuel@ledu-giraud.fr \
    --cc=mardani29@yahoo.es \
    --cc=stephen.berman@gmx.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.