Put the cursor in the logical place after rendering shr
authorLars Magne Ingebrigtsen <larsi@stories.(none)>
Sat, 7 Jan 2012 04:51:11 +0000 (05:51 +0100)
committerLars Magne Ingebrigtsen <larsi@stories.(none)>
Sat, 7 Jan 2012 04:51:11 +0000 (05:51 +0100)
* shr.el (shr-visit-file): Move point to the beginning of the buffer
after rendering.

lisp/ChangeLog
lisp/shr.el

index 2bc78be..5799dcb 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-visit-file): Move point to the beginning of the buffer
+       after rendering.
+
 2012-01-07  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-sync.el (gnus-sync-newsrc-groups): Quote normally.
index d4d8f7d..969d893 100644 (file)
@@ -134,7 +134,8 @@ cid: URL as the argument.")
   (shr-insert-document
    (with-temp-buffer
      (insert-file-contents file)
-     (libxml-parse-html-region (point-min) (point-max)))))
+     (libxml-parse-html-region (point-min) (point-max))))
+  (goto-char (point-min)))
 
 ;;;###autoload
 (defun shr-insert-document (dom)