[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

history position after w3m-browse-url



After doing a w3m-browse-url in an existing w3m buffer, pressing "B"
w3m-view-previous-page returns to the previous page but leaves point at
the start of the buffer, where I hoped it would restore point to its
previous place.

I wonder if w3m-browse-url would do w3m-history-store-position similar
to what "Ret" w3m-view-this-url does for link following, per below.

I'm not certain if more is needed.  This works when the w3m buffer is
the current window, but if the w3m buffer is not in any window then
point doesn't seem to be restored correctly.

Does w3m-history-store-position expect to be called with the w3m buffer
current, or displayed, or something?


2012-07-15  Kevin Ryde  <user42@xxxxxxxxxx>

	* w3m.el (w3m-browse-url): Call w3m-history-store-position to save
	position in existing w3m buffer.
--- w3m.el.~1.1586.~	2012-07-15 10:43:11.000000000 +1000
+++ w3m.el	2012-07-15 10:51:47.000000000 +1000
@@ -9999,6 +9999,7 @@
     (setq url (w3m-canonicalize-url url))
     (if new-session
 	(w3m-goto-url-new-session url)
+      (w3m-history-store-position)
       (w3m-goto-url url))))
 
 ;;;###autoload