Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

wgrep.el does not work on Emacs 26

182 views
Skip to first unread message

Lele Gaifax

unread,
Feb 25, 2018, 12:51:25 PM2/25/18
to help-gn...@gnu.org
Hi,

since some time now wgrep[*] does not work anymore in my Emacs 26
installation.

I cannot be 100% sure, but I seem to remember it used to work with that
version (I recompile my Emacs every month or so, refreshing its sources from
the repository).

Today I tried to dig into the issue, but with no luck. I then compiled an
Emacs 25 just to test it, and no surprise, there it works as expected.

On Emacs 26, its standard keybinding C-c C-p (wgrep-change-to-wgrep-mode) does
not alter the buffer readonly state, but even when toggling it manually with
C-x C-q the *grep* buffer remains unmodifiable; when I tried setting
inhibit-read-only to t, I was able to change its content, but applying the
changes with C-c C-e (wgrep-finish-edit) emits only the message "(No changes
to be performed)"...

I noticed that the normal wgrep behaviour of using a "green" face for the
modifications (that is, when in wgrep-mode, altering the matched lines makes
them appear with a green background...) does not happen neither.

Any hint on where to dig deeper, or on alternative to wgrep?

Thanks in advance,
ciao, lele.

[*] https://github.com/mhayashi1120/Emacs-wgrep
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
le...@metapensiero.it | -- Fortunato Depero, 1929.


John Shahid

unread,
Feb 25, 2018, 3:06:02 PM2/25/18
to Lele Gaifax, help-gn...@gnu.org

I do not have trouble using wgrep with the emacs-26 branch (commit
71243f0b13). I use straight which clones wgrep locally. If you're
interested I'm currently using commit 1cdd7c1 of wgrep. That said, I
didn't notice any problems using wgrep with emacs-26 since I switched to
emacs-26 many months ago.

which version of wgrep are you using ?

cheers,

-js

Lele Gaifax

unread,
Feb 25, 2018, 4:21:42 PM2/25/18
to help-gn...@gnu.org
John Shahid <jvsh...@gmail.com> writes:

> I do not have trouble using wgrep with the emacs-26 branch (commit
> 71243f0b13).

Uhm, very strange. My emacs-repository-version says 47aa85c7, and I'm going to
refresh it right now.

Just to be sure, do you mean that doing the following steps within an "emacs -q":

- M-x load-file wgrep.el
- M-x grep
- C-c C-p

you obtain a modifiable buffer with the grep result, and a C-c C-e does apply
the changes?

> which version of wgrep are you using ?

Usually the one from MELPA, that is almost the same as the 1cdd7c1 straight
from the repository. I tried with both, with the same result.

ciao, lele.

Lele Gaifax

unread,
Feb 25, 2018, 5:25:39 PM2/25/18
to help-gn...@gnu.org
Lele Gaifax <le...@metapensiero.it> writes:

> John Shahid <jvsh...@gmail.com> writes:
>
>> I do not have trouble using wgrep with the emacs-26 branch (commit
>> 71243f0b13).
>
> Uhm, very strange. My emacs-repository-version says 47aa85c7, and I'm going to
> refresh it right now.

I'm now at your same commit, and doing this:

> Just to be sure, do you mean that doing the following steps within an "emacs -q":
>
> - M-x load-file wgrep.el
> - M-x grep
> - C-c C-p

I end in a *grep* buffer that is *not* in read-only mode, but where I can't
change its content.

John Shahid

unread,
Feb 25, 2018, 9:05:25 PM2/25/18
to Lele Gaifax, help-gn...@gnu.org

It turns out I use ag instead of grep which works as expected. For
clarity, I'm replacing the grep command with "ag --nogroup something"
and the resulting buffer works fine with wgrep. If I use the default
grep command "grep -nH --null something" then I'm able to reproduce the
issue you're reporting. Unfortunately I don't have time right now to dig
deeper into this.

cheers,

-js

Lele Gaifax <le...@metapensiero.it> writes:

Lele Gaifax

unread,
Feb 26, 2018, 3:08:26 AM2/26/18
to help-gn...@gnu.org
John Shahid <jvsh...@gmail.com> writes:

> It turns out I use ag instead of grep which works as expected. For
> clarity, I'm replacing the grep command with "ag --nogroup something"
> and the resulting buffer works fine with wgrep. If I use the default
> grep command "grep -nH --null something" then I'm able to reproduce the
> issue you're reporting.

Ah, good hint, it suggested me a different POV: it's the "--null" flag to grep
that make the difference, if I remove that from the command line execute by
M-x grep then wgrep works!

I will dig this further, trying to figure out how that --null is handled.

thank you&ciao,
0 new messages