[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames
From: |
Stefan Kangas |
Subject: |
bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames |
Date: |
Sun, 3 Sep 2023 11:54:07 -0700 |
Eli Zaretskii <eliz@gnu.org> 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').")
BTW, I see that doom-emacs has something much like this here:
https://github.com/doomemacs/doomemacs/blob/7a7503045850ea83f205de6e71e6d886187f4a22/modules/emacs/dired/config.el#L33
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Stefan Kangas, 2023/09/03
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Eli Zaretskii, 2023/09/03
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Manuel Giraud, 2023/09/03
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Stefan Kangas, 2023/09/03
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Eli Zaretskii, 2023/09/03
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames,
Stefan Kangas <=
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Eli Zaretskii, 2023/09/03
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Stefan Kangas, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Manuel Giraud, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Po Lu, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Manuel Giraud, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Stefan Kangas, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Po Lu, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Stefan Kangas, 2023/09/05
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Eli Zaretskii, 2023/09/04
- bug#64791: 30.0.50; [PATCH] Fix dired mismatch on some filenames, Stefan Kangas, 2023/09/05