2

windows 10, emacs 26.1

  1. M-x occur
  2. Some text to find
  3. Result show in Occur buffer.

Nice. How I can save content of this buffer in the file?

a_subscriber
  • 3,854
  • 1
  • 17
  • 47

1 Answers1

4

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.

YoungFrog
  • 3,496
  • 15
  • 27