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#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames Date: Mon, 04 Sep 2023 10:05:19 +0200 Message-ID: <87r0netlc0.fsf@ledu-giraud.fr> References: <87sf9gozbl.fsf@ledu-giraud.fr> <83fs5g8392.fsf@gnu.org> <87lef8ovgc.fsf@ledu-giraud.fr> <835y6c7yvo.fsf@gnu.org> <87ttsbbbfy.fsf@ledu-giraud.fr> <83zg235d47.fsf@gnu.org> <83wmx75aad.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12668"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64791@debbugs.gnu.org, Stefan Kangas To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 04 10:06:23 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 1qd4bG-00033k-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Sep 2023 10:06:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qd4ay-0000pg-5F; Mon, 04 Sep 2023 04:06:04 -0400 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 1qd4aw-0000pV-Nq for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2023 04:06:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qd4aw-00064l-FW for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2023 04:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qd4av-0004cL-Rn for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2023 04:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Sep 2023 08:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64791 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64791-submit@debbugs.gnu.org id=B64791.169381472617703 (code B ref 64791); Mon, 04 Sep 2023 08:06:01 +0000 Original-Received: (at 64791) by debbugs.gnu.org; 4 Sep 2023 08:05:26 +0000 Original-Received: from localhost ([127.0.0.1]:48227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qd4aL-0004bR-Rk for submit@debbugs.gnu.org; Mon, 04 Sep 2023 04:05:26 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]:32858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qd4aJ-0004bH-AF for 64791@debbugs.gnu.org; Mon, 04 Sep 2023 04:05:24 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=obgmfwlR AWdxi7CmoZ2scdQKxuYmz8rzzU4/tXF99Lg=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=kJ5RSxOfIaQACs2PFF5R8bWbzebce1 9z3pYzOPgTAsxe9k2ubzmGIqUsySLqMJj01ncTjytTRCD+FFe+AdVwBw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=obgmfwlRAWdxi7Cm oZ2scdQKxuYmz8rzzU4/tXF99Lg=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=wU63YWxVhEViF5c8raXc2hUYVepD701pWLre51 ymO0pOoyrJcnOBt5Q3bSvhFPBLdWI45ZlHy3nIo1TVbH2I79QAIFCslXitcilJiT4+pGQ4 wzH5XjSmzMwL5gLCq7JFDvE2Fy2SBu7x015sfs9f2u9KNmi5vqVA8X60qdWsGbM69+8930 VRWyF5xtpgcjwvQLXQ0SSJhKMM9CXV9LvD5PqEulLSF3d+fd/LUHNZf2eT/2+CXFaPlh46 PY3NU0cNyWdpz2MRPOlvgn9uynaTtg1OzsllE9SB9vXt+6/00FEL1e5OH+Zw7qQbaTNDoq KePUEP/2kIwwPt77ic/0Iwcg== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 13b57b13 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 4 Sep 2023 10:05:20 +0200 (CEST) In-Reply-To: <83wmx75aad.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 03 Sep 2023 22:25:30 +0300") 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:269217 Archived-At: Eli Zaretskii writes: >> From: Stefan Kangas >> Date: Sun, 3 Sep 2023 11:54:07 -0700 >> Cc: manuel@ledu-giraud.fr, 64791@debbugs.gnu.org >> >> Eli Zaretskii writes: >> >> > What about making insert-directory-program a defcustom, so that people >> > who have GNU ls under a name other than "ls" could customize that? >> >> We could do that. It wouldn't help my case unfortunately, as I'm using >> the same config on my GNU/Linux machines as well, so I have to do the >> whole `executable-find' thing anyway. >> >> What do you think of something along these lines, which seems to work at >> least on macOS and OpenBSD? If you agree, we could investigate if it >> works on FreeBSD and NetBSD too. I *think* it will, but it's worth >> checking to make sure. >> >> diff --git a/lisp/files.el b/lisp/files.el >> index 4188615e490..88c4ecadc9a 100644 >> --- a/lisp/files.el >> +++ b/lisp/files.el >> @@ -7723,7 +7723,11 @@ shell-quote-wildcard-pattern >> pattern)))) >> >> >> -(defvar insert-directory-program (purecopy "ls") >> +(defvar insert-directory-program >> + (if (and (memq system-type '(berkeley-unix darwin)) >> + (executable-find "gls")) >> + (purecopy "gls") >> + (purecopy "ls")) >> "Absolute or relative name of the `ls'-like program. >> This is used by `insert-directory' and `dired-insert-directory' >> \(thus, also by `dired').") > > If we believe "gls" is the only popular name, I guess that's good > enough. Hi, I don't know if this count as a test but it seems that both FreeBSD and NetBSD also called it "gls" in their respective packages: https://cgit.freebsd.org/ports/tree/sysutils/coreutils/pkg-plist http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/coreutils/PLIST?rev=1.22&content-type=text/x-cvsweb-markup But, I have to say that I still don't understand why you would not also consider applying my patch. -- Manuel Giraud