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

Re: w3m-clear-display-while-reading vs w3m-view-header on link



On 2018-05-18 18:20, Kevin Ryde wrote:
> Boruch Baum <boruch_baum@xxxxxxx> writes:
> >
> > How could I reproduce your bug?  When I open a buffer to google.com and
> > press =
>
> Yes, just that.  Emacs 25.2 -Q, cvs emacs-w3m and say
> (w3m-browse-url "http://www.google.com.au/search?q=emacs-w3m";)
> point on a link, and in "=" expect current page url and also
> "Current Anchor:" with url of the link destination.  It does it for me
> on either a remote or local page.  If point on an image then expect
> "Image:" url too.

I still have no luck reproducing your report, but upon re-reading maybe
we have different expectations of what the command should do. Per the
docstring, function `w3m-view-header` ... Display the header of the
*current page*, not the header of the url at point. Is that the
confusion? In order to get a link's page header information, we would
need to post a GET request for that page, which would give us the entire
page along with the header, so it would be the same as loading the link.

OTOH, emacs-w3m does you two other ways to see the url (not the complete
header) of the link:

1] Just navigate to it and look in the mini-buffer echo area. It should
automatically appear.

2] If you've performed an emacs action that has updated that display,
just press 'u', the default keybinding for function
`w3m-lnum-print-this-url'.


While trying to reproduce your report, I got tired of having my test
page reload when pressing 'B' to back out of the header page display. It
occurred to me that the header information should appear in a new buffer
instead of in the same one as the page; that way, you never lose the
original page and can keep the header info open while you continue to
browse (maybe to compare with other headers), and the page text doesn't
need to be re-rendered.





-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1711
diff -b -u -p -r1.1711 w3m.el
--- w3m.el	17 May 2018 04:21:01 -0000	1.1711
+++ w3m.el	22 May 2018 13:38:56 -0000
@@ -10699,7 +10710,7 @@ non-ASCII characters."
 	(if url
 	    (progn
 	      (w3m-history-store-position)
-	      (w3m-goto-url url)
+              (w3m-goto-url-new-session url)
 	      (w3m-history-restore-position))
 	  (w3m-message "Can't load a header for %s" w3m-current-url)))
     (w3m-message "Can't view page header")))
Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3670
diff -b -u -p -r1.3670 ChangeLog
--- ChangeLog	18 May 2018 07:59:06 -0000	1.3670
+++ ChangeLog	22 May 2018 13:38:57 -0000
@@ -1,3 +1,8 @@
+2018-05-22  Boruch Baum  <boruch_baum@xxxxxxx>
+
+	* w3m.el (w3m-view-header): Display header information in new buffer
+	instead of in same one as original rendered html of page.
+
 2018-05-18  Katsumi Yamaoka  <yamaoka@xxxxxxx>

 	* w3m-proc.el (w3m-process-stop): Don't move point ([emacs-w3m:12976]).