From: Lars Magne Ingebrigtsen Date: Thu, 17 Mar 2011 16:45:28 +0000 (+0100) Subject: * shr.el (shr-visit-file): New command. X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=7d572bd284be447a963c50800a8d397c844cb638 * shr.el (shr-visit-file): New command. --- 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)