Looks like I didn't look hard enough.
There are some other things...
How can I define a new verbatim-like environment that does something else with the content, for example write it to a file *then* do some other thing? (verbatim package, redefine verbatim@line hook and similar? I think there should be some simpler solution and it's already asked somewhere)