Is there a way to remove occurrences in Occur mode? In particular, this piece of functionality would allow you to remove occurrences in case you are interested in editing only some out of all occurrences in Occur mode.
Example: say I have this piece of code:
import os
import time
print("Just an example")
john.age = 44
anna.age = 55
print("Something")
bob.age = 83
If I run occur searching for "age", I get:
3 matches for "age" in buffer: untitled
6:john.age = 44
7:anna.age = 55
9:bob.age = 83
And after that I would like to have a function that allows me to, with the cursor in the desired line, remove that occurrence from the buffer so that any following edit will not have any effect into the removed occurrences. In the given example, if I did not want to edit line 7, I could run the desired function to get the occur buffer in the following new state:
3 matches for "age" in buffer: untitled
6:john.age = 44
9:bob.age = 83
I know that it is possible to use Narrowing commands inside an occur buffer, but that would not cover the case where my lines of interest are scattered around other occurrences and it would also not be as simple as selecting the lines I do not want to mess with. Also, having this functionality would save time from having to write complex regular expressions even in the case where we could get the specific occurrences we are interested in from a single search.