all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Joel Reicher <joel.reicher@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Should project delegate project-find-regexp?
Date: Thu, 7 Apr 2022 14:34:06 +0200	[thread overview]
Message-ID: <20220407123406.k3vtkxzky4zzl3ba@Ergus> (raw)
In-Reply-To: <86bkxdf71q.fsf@gmail.com>

On Thu, Apr 07, 2022 at 09:48:33PM +1000, Joel Reicher wrote:
>It seems to me that, at least in the case of git, 'git grep' offers a
>superior implementation to anything offered by the generic
>implementation of project-find-regexp.
>
>At the moment project delegates the list of files to vc (for example)
>but perhaps it should delegate the regexp search itself?
>
I think it could and the implementation itself is not very complex to do
for this specific use case, the problem is that vc if a general frontend
for many vcs, and most of them does not support regex search... On the
other end project.el itself is agnostic respecting to the vc (or the
backend) in use, so to support this it may be needed some kind of
desicion between the two ends to use git specific code in the vc-side
adding a regex function wrapper that will only work for git..

OTOH the current implementation relies on the xref-matches-in-files
which will respect all the xref customs implied (like
xref-search-program) reusing all the existing code to match patterns,
and read the outputs from the processes.

In practice I know that git grep is good, but I am not sure how
"superior" is it compared to what we already have and if it worth to use
it.

Are there any real difference?

>Regards,
>
>        - Joel
>
Best,
Ergus



  reply	other threads:[~2022-04-07 12:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 11:48 Should project delegate project-find-regexp? Joel Reicher
2022-04-07 12:34 ` Ergus [this message]
2022-04-07 12:55   ` Joel Reicher
2022-04-07 14:30 ` Dmitry Gutov
2022-04-07 16:10   ` Ergus
2022-04-07 16:33     ` Dmitry Gutov
2022-04-08  8:40   ` Joel Reicher
2022-04-18  3:01     ` Dmitry Gutov
2022-04-09 23:01   ` Jim Porter
2022-04-18  3:06     ` Dmitry Gutov
2022-04-07 16:56 ` Sean Whitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220407123406.k3vtkxzky4zzl3ba@Ergus \
    --to=spacibba@aol.com \
    --cc=emacs-devel@gnu.org \
    --cc=joel.reicher@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.