bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66806: 30.0.50; [PATCH] 'project-find-regexp' passes Git submodules


From: Dmitry Gutov
Subject: bug#66806: 30.0.50; [PATCH] 'project-find-regexp' passes Git submodules to the search program
Date: Mon, 30 Oct 2023 00:14:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 29/10/2023 08:06, Eli Zaretskii wrote:
Cc:dmitry@gutov.dev
Date: Sat, 28 Oct 2023 22:36:07 -0700
From: Jim Porter<jporterbugs@gmail.com>

--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -960,7 +960,8 @@ project-find-regexp
           (default-directory (project-root pr))
           (files
            (if (not current-prefix-arg)
-              (project-files pr)
+              ;; XXX: See the comment in project-query-replace-regexp.
+              (cl-delete-if-not #'file-regular-p (project-files pr))
                   ^^^^^^^^^^^^^^^^
I think we want to prefer using seq.el functions, since seq.el is
nowadays preloaded.  Is there a good reason to use cl-delete-if-not
here?

I'm okay with using seq with other things equal, but in this case both cl- approaches are too slow, and seq-difference is no better because of consing and indirection overhead (about 10-20% slower than current). I'd say it's a shortcoming of seq.el: only having non-destructive versions.

I had some hope for cl-nset-difference, but looking at the implementation it just delegates to the non-destructive cousin (I guess providing the optimized implementation was left as TODO).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]