From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= 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 18:09:37 +0100 Message-ID: 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> <87fsab75dn.fsf@ledu-giraud.fr> Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5349"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cc: 62096@debbugs.gnu.org, stephen.berman@gmx.net, drew.adams@oracle.com To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 18:10:28 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 1pb2jj-0001Cv-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 18:10:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb2jL-0005ru-Sd; Sat, 11 Mar 2023 12:10:04 -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 1pb2jK-0005py-BL for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 12:10:02 -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 1pb2jK-0000Px-2b for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 12:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pb2jJ-0002V6-KA for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2023 12:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2023 17:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62096 X-GNU-PR-Package: emacs Original-Received: via spool by 62096-submit@debbugs.gnu.org id=B62096.16785545929592 (code B ref 62096); Sat, 11 Mar 2023 17:10:01 +0000 Original-Received: (at 62096) by debbugs.gnu.org; 11 Mar 2023 17:09:52 +0000 Original-Received: from localhost ([127.0.0.1]:58561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb2j9-0002Ue-Vw for submit@debbugs.gnu.org; Sat, 11 Mar 2023 12:09:52 -0500 Original-Received: from sonic308-18.consmr.mail.ir2.yahoo.com ([77.238.178.146]:40971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb2j6-0002U3-GS for 62096@debbugs.gnu.org; Sat, 11 Mar 2023 12:09:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1678554581; bh=gOd8g3s5nCjVgEopQbwJqC/whq0y9vMROshxZ8/1suw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=GlBZPaczJuop4dPP03e6ZKkYypPIpkjgUEoLdwrztCMpAARxlOF9kZ0us4WeiiBL++Hh9YT0e9sIdt47dk2VL3MPE/FqW8znprqFmL8Ox3NDUARf0a9pS9awN8poDunWFVO9a4ZcpP30IgIkN6yeiAfVvhKXVWa4A+XnwLRUQt9OOnx8W5j7J9YVBClDwv8zKZnXOz0PXywC2+Wb+WwQX1zEZOLjrZJSbp6fZcT11/tS7MSWBnpOQJm4RfCqOCFLNJSxgQRZM8z+8NWCWtw+L3aj60fDs4gkUWLwyQtK4q93L+IYoUUInm245SQRqxrROGN25kQkeIPANldjzHDRiw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1678554581; bh=fqQB8i/uqB4hssEcHfFbK3vZ+uew2dyPnkOTxegvhz+=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=FSsMS31M4CYAa1TdQW3C1Jr/9nWRIj+f5osbOqUDOb5nMTNt/6mAV4bIKVw+Yyn9r+Jw0dtGU19P1U9b9ZFzobA5Plh9lPZraruTPYbHLeRF8LeVAixmuOmsh+0kSpffPyaSSNHeTu90iYz6qGtBWrMp8X0yzh3iv/WOW9D9ixM8d39F6MhRfSxkHoL43GrggH60a3Kcq52En0dDPPLVQz31oig49/B2LWnhM5pBa0zBX05D9pjYqfG1nconlZMPZysiJ2TAx7VS/GcP4/nuqtX6tF6HZteelmPuTCmwYPzcblPU2gGokvdifIJvzIBuhDKs42GvrKZ61DLkU2Cq2g== X-YMail-OSG: soET8vwVM1nvk88ZnIAELhFbHxPvDNyE.11uYWVK0VwnMirD8paVtS.MZk9YBIn fRxT5.VVtZxQgNVr6cQ65m2EH8y3EDu_oA7ALOcbVA6bD_DMsz_xnVPsE76xRllHXseeUJ3m1zbX PRcvNs8j00YKcUv9g_ts8BFeEHD5BJArlsdtfxeAAfGdvwAo2LqhS8kicUyBXMgzUJjQAHRdWz36 a7D3acIciYRN9Mco3VmydXgkpZE8sD3uwjnhlZbp1Sm_yKTctlY5WtFZPqUEOOUM7GFT8mWR9mgR F2vCkVYFroaLAUlDWyyY1O31abqwrTK_yGmVVR8XhCgmv8Ctd6f.o8Zabqel992bC4oMaa46yFWK 707w3DQpooqB1ACUOzkra5yQI3kABdjh.hKQyua0_u.YjfLOsJDH79XYnwxo4efm7GwfIBzvnT47 jFiDTBLXgz2mibIIHcHK223ZZh_aW1D3V1LJPo.6Ay08Jy_x2FvA7.jBrRtlbT9GESw5NaXgrd2p B.0_WbjWIR1IarVZ8LIoQr0MhpEcu1kVoA5Qy0LZiAUJ01zlq0ckgbEVn3Lmn_fZWahep4g_voIF 0Q0LfxG.Ueat8J7WFLXNmKg9b.QAdN.H0VmDy66iRDuG05kuA9QHPyQ9h_XOUBk4w6vZ3CvAcjYh ELUDy_FpXuZJhKL__g2sts1fGnDA2GBICRuCk76dbcd50X01gkKUxIEftEF9hPyDC_HKrb9R0jrK RaFnsG461I3lYiQkn9mV9N.hf.okV5XBVVj8NJMNH2EUB0E3dzWYzkcmW39qQaedg9yJM_SHaNH1 zyesxi5mHRpG1EBGgIKJi2ePa.1zMLqpgWIM7as2IQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ir2.yahoo.com with HTTP; Sat, 11 Mar 2023 17:09:41 +0000 Original-Received: by hermes--production-ir2-5b7d458747-rxkcm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 42e6e71d5881840f774deb9762f65ff2; Sat, 11 Mar 2023 17:09:38 +0000 (UTC) In-Reply-To: <87fsab75dn.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Sat, 11 Mar 2023 15:02:44 +0100") X-Mailer: WebService/1.1.21284 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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:257809 Archived-At: Manuel Giraud 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.