windows 10, emacs 26.1
- M-x occur
- Some text to find
- Result show in Occur buffer.
Nice. How I can save content of this buffer in the file?
You can use write-file
(C-x C-w
), then specify a filename.
C-x C-w runs the command write-file (found in global-map), which is an interactive compiled Lisp function in ‘files.el’.
Note however this does not preserve the metadata of the buffer : if you save the buffer to a file, kill the buffer and re-open the file you just saved, you only get the text, no hyperlinks.