Is there a way I can collapse/expand regexp matches within a line?
e.g. let's say I have this list and want to hide some parts of it temporarily:
* apple: fruit; red
* butter: dairy; yellow
when I set the regexp to ":.*$" and fold the matches, it should become something like this:
* apple...
* butter...
when I set the regexp to ":.*;" instead, and fold the matches, it should become something like this:
* apple... red
* butter... yellow
And when I expand the list, it should get back to the original view:
* apple: fruit; red
* butter: dairy; yellow
However, none of the methods I found so far doesn't seem to work this way.
I tried folding mode, but it only worked for blocks of text, and it didn't work for string within a line.
i.e. it doesn't work when I set it to hide things between ":" and ";" below. It doesn't do anything in that case. It only kind of works (but not really appropriately for my purpose) when I set it to hide things between ":" and ":" since they are placed across the lines.
When I try to hide things between ":", this
* apple: fruit; red
* butter: dairy; yellow
becomes this:
* apple: fruit; red...
: dairy; yellow
(It might be not exactly like this: I tried this yesterday and I don't remember exactly except that it didn't work fine.)
I also tried hs-hide-all with text like "{this should be hidden}" in both org mode and emacs lisp mode, but it didn't do anything. Is this function known to be tricky or something? I'm not even sure if this function is supposed to work for hiding text within a line not across lines, or I'm misusing it.