From: Lars Magne Ingebrigtsen Date: Thu, 27 Nov 2014 16:06:26 +0000 (+0100) Subject: Record the right URL in eww X-Git-Tag: emacs-25.0.90~2635^2~297 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4c555e9afaf74d513d1fa7717a07abe662594cd3;p=emacs.git Record the right URL in eww * net/eww.el (eww): Record the new URL immediately, so that if the HTTP fetch fails, we have the right URL in the buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85748e60208..b0b1d747746 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-11-27 Lars Magne Ingebrigtsen + * net/eww.el (eww): Record the new URL immediately, so that if the + HTTP fetch fails, we have the right URL in the buffer. + * dom.el (dom-pp): New function. 2014-11-17 Eli Zaretskii diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 10298b109d1..a8c910945b6 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -255,6 +255,7 @@ word(s) will be searched for via `eww-search-prefix'." (replace-regexp-in-string " " "+" url)))))) (unless (eq major-mode 'eww-mode) (eww-setup-buffer) + (plist-put eww-data :url url) (eww-update-header-line-format) (let ((inhibit-read-only t)) (insert (format "Loading %s..." url)))) @@ -503,11 +504,8 @@ See the `eww-search-prefix' variable for the search engine used." (doc-view-mode))) (goto-char (point-min))) -(defun eww-setup-buffer (&optional buffer) - (switch-to-buffer - (if (buffer-live-p buffer) - buffer - (get-buffer-create "*eww*"))) +(defun eww-setup-buffer () + (switch-to-buffer (get-buffer-create "*eww*")) (let ((inhibit-read-only t)) (remove-overlays) (erase-buffer))