From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Should project delegate project-find-regexp? Date: Thu, 7 Apr 2022 14:34:06 +0200 Message-ID: <20220407123406.k3vtkxzky4zzl3ba@Ergus> References: <86bkxdf71q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Joel Reicher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 07 14:36:28 2022 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 1ncRNE-00057G-FS for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Apr 2022 14:36:28 +0200 Original-Received: from localhost ([::1]:36394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncRND-00076P-AV for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Apr 2022 08:36:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncRLC-0006JG-6Z for emacs-devel@gnu.org; Thu, 07 Apr 2022 08:34:22 -0400 Original-Received: from sonic304-9.consmr.mail.bf2.yahoo.com ([74.6.128.32]:33010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncRL7-0006xq-Vc for emacs-devel@gnu.org; Thu, 07 Apr 2022 08:34:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1649334855; bh=BYCJKiEwYliph9LrGdf4ftrgZ6ZCm4Py/f4EJ9kn5Fc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=ssGYW9rsD+57VjEU5gFHTRiNGZ6DHmXG/pg5YaSf5BlN2LuddaAvbZk3Alow8613I1k95IQsgx/4kIrm3uSE0aVMFy89Dzj2DRx1Sl4l4zAhC/ya4texpBik1arlN1mINDHFfhDpkMxNfLv1Q3F0v54TGsIeYfVIxSyqmyBPK/s8KcC5XNqke3G+6JGEVQvk2LkS0ouTdGVM+s5G3+qStlQqUUPuMHJxuL5SBIGXQLtQfCSsdC+eumHy3WNCs/pfd2q7gX7LqVSni+I3SCJJJCWRmpKJeaMdQqnPIu1rsOmmiHjc8+YRK9D82chEo22Bot4L5/rIQMuYm49RnixA0g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1649334855; bh=X15DrfLu+zANC3RIIz+PiO/Kf/M9tTD0UugSdG0AJr4=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=MlE3CqDyH4ImzuVjvyAbMgjNNX+n2AV/d95Qn6ZV8d742nItAZg3eWNvToz6EtUihtEeRSt1bbluf33n/1kNC596MEM9fnWUbIuix7LfPfh2aL5tCkIabiCh6sI8rZdDrveJzLaiK26bhakz2I5L5djOW0j/C4JUt9BvpBEAF360rwMQLDKiN2rDD7tOw3HU6cQHrbjk77aiX3AuFuFaRxJlaDDY2tEsOey5ovgEgK/OhBLj5si8cbRQE6SF2DrvZ5GLBsnBsHNzIGV8ivkhJG3XEf45/17UXiA2Bu0T+xe6n4M1yH6LFxsbBN8dWoTHmCYaigi8nxn5jPTT13emEQ== X-YMail-OSG: m3NUlXwVM1m5GXHar0EMlu3cNpHV4G8ro4eXnLYq4UP9lKSvkn6dpe54EyoVj3B FiZlfPrvgDASFKx_4l4LEkXHzbnjLREHZUm4OJqn1RO5GwIm92FJ7UCVEaHd8R0u7WS8FI6M6vW1 t5brGxZno7A8Q3mKrGZMxllmN8R84Eq9Q8ehIaH7ZgBx589wvIpfDI5qOHvzelNFMeMNI94vgRR7 6QBvzp6aayuXN2N9WZbJhYZA5B.mgDfuWb5TGwVxOW6_TLXympsd.Cbw6sZtG4lI2hGrSVWBueEH vDd0.iE22nIaL6XbSsyKyMnk.L4UnN9Oqbpaf1WERs455nPBfGMghwAfHT2e8EoToU7rvkb7_.4W 607o5bzFGADO22uqbi7M7Y9bTNZhMqxmcmnd5Z2vCT5dIWjZTtsyj5EWql3ambwK9VDZ46j84BcD zSd7Q5bILXnczIrc0bCsO7c3MshpjVz1zHpl5zxIjDdjwoFTR53iJFOzq1loShHelvUwYYd695uy gRwZP2mQ.aAuF4qKYOEVeWUWXZQI_sVG0roa.Rpq5iUwIiT851Fi9HQlZCa9eUgHzYjYYQaxX0HH s2cmLYskmLLHgAaCecSVemQDvV_Ni5f6Gy9z_En.txDpr90_SjO7FKAnU1gZAFdZWo4zeOJKNj1A jdK_7h48VAnWGthldGhmGhrFMkn6G8rsC7jwz3zcmO5qulZZeuuBfxZDDj6e4dtHpCc2vsT3UOAV K0deAXjgcAbIITapdRvRE2VCiqM_cqcGiOHT1atKbnI74BOT2CCEBrEzgVkEqVjhUPtnTQh6F7d_ Ga7TG2YcoHI5RRq727jjwUlkCFbo8rWrN4EVi9hi_g X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Thu, 7 Apr 2022 12:34:15 +0000 Original-Received: by kubenode509.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 3c0ed7617471f6bc561b0db329121ed0; Thu, 07 Apr 2022 12:34:10 +0000 (UTC) Content-Disposition: inline In-Reply-To: <86bkxdf71q.fsf@gmail.com> X-Mailer: WebService/1.1.20001 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.128.32; envelope-from=spacibba@aol.com; helo=sonic304-9.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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" Xref: news.gmane.io gmane.emacs.devel:287885 Archived-At: 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