From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames Date: Sun, 3 Sep 2023 04:34:38 -0700 Message-ID: References: <87sf9gozbl.fsf@ledu-giraud.fr> <83fs5g8392.fsf@gnu.org> <87lef8ovgc.fsf@ledu-giraud.fr> <835y6c7yvo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26698"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64791@debbugs.gnu.org, Manuel Giraud To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 03 13:35:12 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 1qclNo-0006kr-6g for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Sep 2023 13:35:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qclNV-0008Lh-TQ; Sun, 03 Sep 2023 07:34:53 -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 1qclNU-0008LY-EL for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 07:34:52 -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 1qclNT-00057l-VE for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 07:34:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qclNe-0004H1-7X for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 07:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Sep 2023 11:35:02 +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.169374089916411 (code B ref 64791); Sun, 03 Sep 2023 11:35:02 +0000 Original-Received: (at 64791) by debbugs.gnu.org; 3 Sep 2023 11:34:59 +0000 Original-Received: from localhost ([127.0.0.1]:39824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qclNa-0004Gd-Vi for submit@debbugs.gnu.org; Sun, 03 Sep 2023 07:34:59 -0400 Original-Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]:53533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qclNX-0004GK-4L for 64791@debbugs.gnu.org; Sun, 03 Sep 2023 07:34:57 -0400 Original-Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50091b91a83so977979e87.3 for <64791@debbugs.gnu.org>; Sun, 03 Sep 2023 04:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693740879; x=1694345679; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=V7SDy6YlNObBK1NexoNcLBjWrtkdD/AARrhQJX0UVmg=; b=X4DhB9bXpmXYngkqYuFnDQUm4RZ6H0oLgp2wAN1pON+icj7IIA5XscDdJRpqYxwDCm ZaPz8z76R/Z9UwXtPxiOOBiKhN2bx5drm2A4GLmWmcZxYqwnRUd+tw/Mu3WRVgw+q0bv 8Ets0O/jpzlAlVl+z6oz1Vw6Ogf6TqNlN9jmS3Cv/iz0kf34Q0R+VHGeNuwrJ7vP1BJp fZfzLFeUdkTdAVIrKKubSGyvdyJ4owP8UwwiUkO8t5GKUy6z+wqF3j43/4rfLQCKk/oV CceA7zV2av4Dnh+4mbbWaPUzxKXKMzSj9rlTI/l5FPcWdNXmIAqnUwwtGRQkuQdGsnvZ q9yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693740879; x=1694345679; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=V7SDy6YlNObBK1NexoNcLBjWrtkdD/AARrhQJX0UVmg=; b=YfZwAkmlDi6SU65igv3i43ehIeb1ZUJTM23sbwW9tc7nuChrjJsO0/9GgGZa3ISyQa VH2cTbddEKZcUPOnVGzmr/m94GFAKDhRZxTXSrbJFmWGb5ny5nufUb6YulcejMXSF9Wx Ut4nDeLOXE2WOwhrxbcFBRAsxuWTB0DqOLVZLAOpfds2HmL1yA2rsVSgtCD9F9MFiUcB Ne0S0wxSKkSotysJaXLBQuBG9EfNZBVD/s/XLjbX/pmA2b6Ld1OiXjf30ulGxfwFivQc 4VUzDOEgqNaPNaPxIX8FUGYEM2mdOhx6Srka4RKTHP58sdZ7y+8ob34LRmvaBCj1Qh+T iXeA== X-Gm-Message-State: AOJu0Yy1XODQTye0g1dBJFFvCX4CppRpagd4ngGGHpVPu9PuMF9l5fsY V/nGn21x5UqoKloXfQH2/acf3gwfu9gOq+MK5wM= X-Google-Smtp-Source: AGHT+IHW8MGYYNN1uuh9Vy8jIHze9JjRgN6v5QoklTlFCgwc+TWXInoOG7yx/OM946+HpvqDa9jPBLt1DSF3XoDnM44= X-Received: by 2002:a05:6512:3ca8:b0:500:b5db:990b with SMTP id h40-20020a0565123ca800b00500b5db990bmr5781723lfv.47.1693740878695; Sun, 03 Sep 2023 04:34:38 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 3 Sep 2023 04:34:38 -0700 In-Reply-To: <835y6c7yvo.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Jul 2023 18:24:27 +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:269148 Archived-At: Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: 64791@debbugs.gnu.org >> Date: Sat, 22 Jul 2023 16:46:27 +0200 >> >> Eli Zaretskii writes: >> >> > I'm not sure there can be the end to such fixes. The real fix is to >> > use GNU 'ls' which has special support for Dired (or use ls-lisp.el). >> > I guess you don't have GNU 'ls', since you are on OpenBSD? Yup. Perhaps we should consider checking for the existence of "gls" and using that. E.g., I use the following, here: (if (and (memq system-type '(berkeley-unix darwin)) (executable-find "gls")) (setq insert-directory-program "gls")) But I've only tested this on macOS so far, so I'm not sure how well this would work on *BSD. From memory, I think it should be fine. Perhaps Manuel can say what he thinks. >> You're right I'm using OpenBSD's ls. But I thought it was a reasonable >> fix: it seems more obvious then looking for something that looked like a >> file size. > > Maybe. Let's hear what others think about this. FWIW, I don't think I mind such portability fixes. It wouldn't be a bad thing if Dired played a bit more nicely on BSD machines. The point that this could be a slippery slope is valid, but we can also choose to reject further tweaks on a case-by-case basis. The format of ls is also inherently stable: many things depend on it. On the other hand, the fix I propose above might be all that is needed in many cases.