From 7d572bd284be447a963c50800a8d397c844cb638 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 17 Mar 2011 17:45:28 +0100 Subject: [PATCH] * shr.el (shr-visit-file): New command. --- lisp/ChangeLog | 2 ++ lisp/shr.el | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c1b8834b..43ca0665f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-03-17 Lars Magne Ingebrigtsen + * shr.el (shr-visit-file): New command. + * nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch. 2011-03-17 Bjørn Mork diff --git a/lisp/shr.el b/lisp/shr.el index c9c5bd5ff..113137a00 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -113,6 +113,15 @@ cid: URL as the argument.") ;; Public functions and commands. +(defun shr-visit-file (file) + (interactive "fHTML file name: ") + (pop-to-buffer "*html*") + (erase-buffer) + (shr-insert-document + (with-temp-buffer + (insert-file-contents file) + (libxml-parse-html-region (point-min) (point-max))))) + ;;;###autoload (defun shr-insert-document (dom) (setq shr-content-cache nil) -- 2.25.1