From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ruijie Yu via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: master f1a7cd71a04: Fix Dired when QUITING_STYLE is set in the environment Date: Wed, 03 May 2023 08:46:13 +0800 Message-ID: References: <168304957357.27283.16285630990353658152@vcs2.savannah.gnu.org> <20230502174613.DB0F2C0004A@vcs2.savannah.gnu.org> Reply-To: Ruijie Yu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21966"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.22; emacs 30.0.50 Cc: Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 03 02:50:24 2023 Return-path: Envelope-to: ged-emacs-devel@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 1pu0hL-0005Yv-N8 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 May 2023 02:50:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu0gf-0005Sr-Qz; Tue, 02 May 2023 20:49:41 -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 1pu0ge-0005Se-Tk for emacs-devel@gnu.org; Tue, 02 May 2023 20:49:40 -0400 Original-Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu0gd-0001C8-0F; Tue, 02 May 2023 20:49:40 -0400 Original-Received: from fw.net.yu.netyu.xyz ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 758f27a4 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 3 May 2023 00:49:35 +0000 (UTC) In-reply-to: <20230502174613.DB0F2C0004A@vcs2.savannah.gnu.org> Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305756 Archived-At: I noticed that there are two typos to "QUOTING_STYLE" -- not sure if it warrants another commit fixing the code typo. Eli Zaretskii writes: > branch: master > commit f1a7cd71a04270e44845427daa896afe80b0acb0 > Author: Eli Zaretskii > Commit: Eli Zaretskii > > Fix Dired when QUITING_STYLE is set in the environment Typo here. > * 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) > --- > lisp/dired.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > 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. Here as well. > + (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 -- Best, RY [Please note that this mail might go to spam due to some misconfiguration in my mail server -- still investigating.]