Subject: Re: bug#62096: 30.0.50; find-dired, dired-goto-file and spaces

From: Manuel Giraud <[email-masked]>
Date: Fri, 17 Mar 2023 10:12:05 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Manuel Giraud <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked],
>>   [email-masked]
>> Date: Fri, 17 Mar 2023 08:49:47 +0100
>> 
>> So do you think this could go in emacs-29?
>> -- 
>> Manuel Giraud
>
> If you mean the patch posted here:
>
>   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62096#89

Yes, I was talking about this one.

> then it's okay for emacs-29, but please use memq instead of two eq
> test against two literals system-type values.

Here is the new version.  I also modified the commit message a bit.
>From d866c95800bec46dedff6c038f5c566ccb14b642 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <[email-masked]>
Date: Fri, 10 Mar 2023 21:54:00 +0100
Subject: [PATCH] Fix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)

* lisp/find-dired.el (find-ls-option-default-ls): Adapt to a value
that works with the default "find" on *BSD and Darwin/MacOS.  Tested
on OpenBSD and MacOS.
---
 lisp/find-dired.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index 33376ee4ed9..af029fb2074 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -51,7 +51,9 @@ find-exec-terminator
   :type 'string)
 
 (defvar find-ls-option-default-ls
-  (cons "-ls" (if (eq system-type 'berkeley-unix) "-gilsb" "-dilsb")))
+  (cons "-ls" (if (memq system-type '(berkeley-unix darwin))
+                  "-dgils"
+                "-dilsb")))
 
 (defvar find-ls-option-default-exec
   (cons (format "-exec ls -ld {} %s" find-exec-terminator) "-ld"))
-- 
2.39.2

-- 
Manuel Giraud