I'm trying to create a keyboard macro to generate a report which displays the number of times a certain string occurs. I have two buffers,
- with all the strings to look for(on a separate line)
- the target buffer containing all the text to be scanned/counted.
I would like to append the number of occurences after each line. With M-x count-matches
I see the number in my info bar, but I would like it in my kill ring or register so I can append it to the line in the first buffer.
Any other takes on how to solve this more efficiently are welcome also (elisp/sed/awk?)