Text is read-only
Alexander-Shukaev opened this issue · comments
How about narrowing content of the *grep*
buffer to the editable content only? For instance, if one is using evil
and issues %s/foo/bar/g
, it will fail if grep
command itself contains foo
somewhere (in read-only area). Yet another example, %s/grep/ag/g
will fail because grep
is by definition in the read-only area. Manually performing narrow-to-region
only on the matched lines solves this problem. However, file and line number prefixes for each matched line are still read-only as well. That is it would be nice to either strip them as well or overlay them in such a way that any editing commands in Emacs would skip them from consideration. Do you have better ideas?
This was already solved with proper text properties along with Evil Ex obeying query-replace-skip-read-only
.