From: Eli Zaretskii Date: Tue, 2 May 2023 17:46:17 +0000 (+0300) Subject: Fix Dired when QUITING_STYLE is set in the environment X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f1a7cd71a04270e44845427daa896afe80b0acb0;p=emacs.git Fix Dired when QUITING_STYLE is set in the environment * lisp/dired.el (dired-insert-directory): Ensure non-default quoting style of file names is not used by 'ls' when we invoke it with the --dired switch. (Bug#63142) --- diff --git a/lisp/dired.el b/lisp/dired.el index d1471e993a1..e3a9d7bc428 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1653,7 +1653,10 @@ If HDR is non-nil, insert a header line with the directory name." see `dired-use-ls-dired' for more details.") nil)) dired-use-ls-dired))) - (setq switches (concat "--dired " switches))) + ;; Use -N with --dired, to countermand possible non-default + ;; quoting style, in particular via the environment variable + ;; QUOTINTG_STYLE. + (setq switches (concat "--dired -N " switches))) ;; Expand directory wildcards and fill file-list. (let ((dir-wildcard (insert-directory-wildcard-in-dir-p dir))) (cond (dir-wildcard