From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#62096: 30.0.50; find-dired, dired-goto-file and spaces Date: Sat, 11 Mar 2023 15:02:44 +0100 Message-ID: <87fsab75dn.fsf@ledu-giraud.fr> References: <87edpw1wt3.fsf@ledu-giraud.fr> <877cvofvgg.fsf@gmx.net> <87a60k1nus.fsf@ledu-giraud.fr> <875yb81mh3.fsf@ledu-giraud.fr> <87y1o471z3.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62096@debbugs.gnu.org, stephen.berman@gmx.net, drew.adams@oracle.com To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 15:03:20 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pazoe-0006Ba-34 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 15:03:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pazoS-0004qQ-As; Sat, 11 Mar 2023 09:03:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pazoN-0004pA-4V for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 09:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pazoM-00040i-KF for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 09:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pazoM-0003LY-G0 for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 09:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2023 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62096 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: "Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors" , Stephen Berman , "62096@debbugs.gnu.org" <62096@debbugs.gnu.org>, Drew Adams Original-Received: via spool by 62096-submit@debbugs.gnu.org id=B62096.167854337212826 (code B ref 62096); Sat, 11 Mar 2023 14:03:02 +0000 Original-Received: (at 62096) by debbugs.gnu.org; 11 Mar 2023 14:02:52 +0000 Original-Received: from localhost ([127.0.0.1]:56912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pazoC-0003Kn-7W for submit@debbugs.gnu.org; Sat, 11 Mar 2023 09:02:52 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:32998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pazo9-0003Kf-Rd for 62096@debbugs.gnu.org; Sat, 11 Mar 2023 09:02:51 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=CwBHUtQW RtzrZBQgDDAeu5wUvmNmhKqqRcgjcxiEPCg=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=I7Z5ktD/bEm0bagmib1k1WT8CwmYWJ /n3L4K/I6c6QZqA3QwoblpBRvtabNsMOY8C78PazI7hyr5QEi/UGoNDg== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=CwBHUtQWRtzrZBQg DDAeu5wUvmNmhKqqRcgjcxiEPCg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=eWP+2fFGUs5KAkjspeAn6EmUVQdQDpZd0IwuP+ O3wxiE2mzY9WHhPFHJSORo350TQX5jN7BXxy3fNTbjpbGOpnNVKzl5KutkH98Y1fTFyAsN lFoRN5Bd813OxWRu7nOf/iNPsDNxVcVYkCFlFFzZ4b/3kZq2skCbR/cVT5rzUdH48F00ws JiYwVwbtWoKOyfxkZ44GjBktf4DWKI5F1KQxnq0/ZpiwCvYWEU7MkDBeXGAGddjmX4TxGy Tm1Wgbq1yPeng8LVK3MShJhkdP1oo0bgCDq+Rf3dyrkE7EMSo//OI3W3V2GUDGtLmKPJg0 WDuvo/38vqdXxl4zeMfWi/xQ== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 2cc61076 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 11 Mar 2023 15:02:48 +0100 (CET) In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Sat, 11 Mar 2023 01:14:03 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257795 Archived-At: --=-=-= Content-Type: text/plain 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. For testing without recompiling Emacs, one could evaluate this: --8<---------------cut here---------------start------------->8--- (setq find-ls-option-default-ls (cons "-ls" (if (or (eq system-type 'berkeley-unix) (eq system-type 'darwin)) "-dgils" "-dilsb"))) --8<---------------cut here---------------end--------------->8--- Daniel: I'd like to hear what it does on macOS. Drew: You could test on your system by "forcing" 'find-ls-option-default-ls' with the following: --8<---------------cut here---------------start------------->8--- (setq find-ls-option-default-ls (cons "-ls" "-dils")) --8<---------------cut here---------------end--------------->8--- This patch was produce on the main branch but FWIW I think it should also go on emacs-29. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-find-ls-option-default-ls-for-BSD-MacOS-bug-6209.patch >From c9d343babc2ddc65066082669639964a7ddba017 Mon Sep 17 00:00:00 2001 From: Manuel Giraud 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 OpenBSD and should also work with (Free|Net)BSD and Darwin/MacOS. --- lisp/find-dired.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 33376ee4ed9..8f5aaa5f682 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -51,7 +51,10 @@ find-exec-terminator :type 'string) (defvar find-ls-option-default-ls - (cons "-ls" (if (eq system-type 'berkeley-unix) "-gilsb" "-dilsb"))) + (cons "-ls" (if (or (eq system-type 'berkeley-unix) + (eq system-type 'darwin)) + "-dgils" + "-dilsb"))) (defvar find-ls-option-default-exec (cons (format "-exec ls -ld {} %s" find-exec-terminator) "-ld")) -- 2.39.1 --=-=-= Content-Type: text/plain -- Manuel Giraud --=-=-=--