I am aware about w3m integration with Emacs but I am exhausted to make it run on my W7/x64: there is a permanent segmentation fault of w3m binary here.
I wonder if there is an alternative way to display remote HTML in Emacs possibly preliminary filtered in the way it is done by Readability/GetPocket etc. services? I do not need a navigation there so cleared contents would be perfect.
Thanks,
trunk / Emacs 24.4:
eww
RET (URL)
RET
Emacs 24.1 - 24.3:
browse-url-emacs
RET (URL)
RET
load-library
RET shr
RET
shr-render-buffer
RET
(defun my-render-url (url)
"Render URL as HTML."
(interactive "sURL: ")
(require 'shr)
(let ((buf (save-window-excursion (browse-url-emacs url))))
(shr-render-buffer buf)))
Edit: or this, which has absolutely no error handling, but is considerably faster (which I attribute to browse-url-emacs using url-retrieve-synchronously, where as this is asynchronous). Feel free to make improvements :)
(defun my-render-url (url)
"Render URL as HTML."
(declare (obsolete eww "24.4"))
(interactive "sURL: ")
(require 'shr)
(url-retrieve
url
(lambda (&optional status cbargs)
(let ((markup (current-buffer)))
(delete-region (point-min) (1+ url-http-end-of-headers))
(shr-render-buffer markup)
(kill-buffer markup)))))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With