Subject: Re: bug#77732: grep-edit-buffer errors with incionsistent behaviour

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Apr 2025 14:57:42 +0300

> From: Johann Höchtl <[email-masked]>
> Date: Fri, 11 Apr 2025 11:33:59 +0200
> 
> I am using Emacs from HEAD on Windows
> 
> I tried to reproduce the behaviour with emacs -Q but it still remains inconsistent.
> 
> When I rgrep and there are few results (< 15) , I can enter grep buffer pres 'e' to enter grep-edit mode, get
> out of it with C-c C-c, re-enter with 'e' and so on.
> 
> When there are more results, (between 15 and 70)  I still can enter with 'e' get out with C-c C-c but when I try
> to re-enter I get the error message Wrong type argument: stringp, nil
> The buffer later although still in grp-mode does not behave any longer as a grep mode, 'g' or 'e' results in the
> error Buffer is read only : #<buffer *grep*>
> 
> When there are many results, I get the error message Wrong type argument: stringp, nil already on the first
> invocation attempt.

I cannot reproduce this with today's master branch on MS-Windows.  I
just tried with a Grep command that yielded 128 hits, and didn't see
any errors.

Please show the complete recipe for reproducing the problem, with all
the steps and commands explicitly shown.  It is best if you can show
this in the Emacs source tree, so that all of us can easily try the
same recipe with the same files.

Thanks.