I would like to save an eww buffer as an html buffer with text formatting, hyperlinks, etc preserved. If I do
C-x C-w, it saves only the raw text visible in the buffer.
Here is my use case: I use the below helper function to clean up a web page to show only the information relevant to me.
(defun modi/eww-keep-lines (regexp) "Show only the lines matching regexp in the web page. Call `eww-reload' to undo the filtering." (interactive (list (read-from-minibuffer "Keep only lines matching regexp: "))) (let ((inhibit-read-only t)) ; ignore read-only status of eww buffers (save-excursion (goto-char (point-min)) (keep-lines regexp))))
Hyperlinks and text properties are preserved in the eww buffer after calling the above function.
I would like to save the filtered eww buffer I get after calling the above function as an html file.