Subject: Re: bug#70820: [PATCH] Editable grep buffers

From: Jim Porter <[email-masked]>
Date: Tue, 7 May 2024 21:11:42 -0700

On 5/7/2024 8:12 PM, Visuwesh wrote:
> Thanks for your input.  If I missed something from wgrep that you use,
> please let me known.  I will play around with wgrep in some time to
> learn more about what it offers myself.

In addition to the things you mentioned, here are the most important 
features from wgrep for me:

* Mark all non-result parts of the buffer (the command string, file 
names, line numbers, etc) as read-only. This is especially valuable if 
you want to use 'query-replace' or similar to modify the results. Then 
you can't inadvertently edit those bits.

* Fontify any results with changes (both in the grep-mode buffer and the 
original files). This is really useful for being able to see what I've 
changed.

* Adding all the necessary hooks/functions so other grep-like modes can 
use this. For example, see this file from wgrep, which lets you use 
wgrep with ag.el: 
<https://github.com/mhayashi1120/Emacs-wgrep/blob/master/wgrep-ag.el>. 
(This matters to me partly because I'm the author of Urgrep - a 
"universal recursive grep" mode that can use any grep-like program to do 
searches. I've added my own support in Urgrep for wgrep.)