From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt Newsgroups: gmane.emacs.devel Subject: Re: master 19a3b499f84: ; * lisp/loadup.el: Don't prohibit advice when ls-lisp is loaded. Date: Thu, 7 Dec 2023 23:25:44 +0100 Message-ID: References: <170177277759.6083.12155719482709043212@vcs2.savannah.gnu.org> <20231205103937.E1D65C405A8@vcs2.savannah.gnu.org> <020ab182-0e3d-4e8d-9415-c93863b95638@vodafonemail.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17149"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org, Eli Zaretskii To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 07 23:27:10 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 1rBMpp-0004Cz-22 for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Dec 2023 23:27:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBMp5-0003i8-7Q; Thu, 07 Dec 2023 17:26:23 -0500 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 1rBMp2-0003hs-U2 for emacs-devel@gnu.org; Thu, 07 Dec 2023 17:26:20 -0500 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBMoz-0001IE-Kh; Thu, 07 Dec 2023 17:26:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-23sep; t=1701987963; bh=TIsj96ovGFWfgXxtCT95WxDtFGP4X8Z5V2RwLYLMWfI=; h=Message-ID:Date:User-Agent:Subject:To:References:From: Content-Language:In-Reply-To:Content-Type:From; b=awnTushiA6N/4O3Cq5Ir98F9uKXUd1pZx+o0pR53SP2aOk3xsD12TimOOZc5v8dbH smjN5KHwSGTLM045O4EerBhacNOnhXnEO/GsqChHKINPc11ymcyx9OVrhJAK47V50r 2jW9wsRYA5QqUGRUM4z7kcsRDyiNKBCMkNVRRMY0= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4SmTPl3ly4z1xxV; Thu, 7 Dec 2023 22:26:03 +0000 (UTC) Original-Received: from [192.168.178.41] (port-83-236-13-152.dynamic.as20676.net [83.236.13.152]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4SmTPY0Y53zKm4H; Thu, 7 Dec 2023 22:25:49 +0000 (UTC) Content-Language: de-DE-frami, en-US In-Reply-To: X-purgate-type: clean X-purgate: clean X-purgate-size: 2193 X-purgate-ID: 155817::1701987959-37FFC099-0D8F6633/0/0 Received-SPF: pass client-ip=145.253.228.164; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr4.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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:313597 Archived-At: On 2023-12-07 21:06, Stefan Monnier wrote: > [...] Thanks for the explanation. > My WiP patch is attached. Uh. I'm still struggling to understand all bits, but here are already some comments. - The docstring of `ls-lisp--insert-directory' still makes references to its previous advice nature, this probably should be ironed out. - The docstring of `insert-directory-program' does not very explicitly mention that its value could be nil. (Nothing introduced by your patch, just noticed it.) - And the custom spec of `insert-directory-program' isn't prepared for nil as well, but that is probably OK since it should be used for a generated default value only? - AFAICT you call `files--insert-directory-program' as a predicate only. Probably we should rename it to `...-p' or `files--use-insert-directory-program'? - And here is a feeble attempt to provide a docstring: "Return wether `insert-directory' should use an external program. Take into consideration `ls-lisp-use-insert-directory-program' if that is available." - Not sure whether that makes a difference, but: Without your patch the advice was conditional on whether ls-lisp was loaded, now the usage of `ls-lisp--insert-directory' is conditional on whether `ls-lisp-use-insert-directory-program' is bound. What if a user has a .emacs with a customization or `setq' of `ls-l-u-i-d-p' to nil, which she uses both on Windows and Unix? - Your fix in `file-expand-wildcards' (if (equal "" nondir) (push (or dir nondir) contents) is hard to digest at 11PM, so a comment won't hurt here, I guess. Plus it seems to violate the order promise done in the docstring of the function ("... sorted in the `string<' order"). - Now the logic gets harder and harder, so I may be wrong here. The docstring of `dired-insert-directory' seems to handle FILE-LIST exclusive to WILDCARD, as if WILDCARDS do not get expanded if FILE-LIST is non-nil: If FILE-LIST is non-nil, list only those files. Otherwise, if WILDCARD is non-nil, expand wildcards; but your patch changes that, no? Jens