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

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



In [emacs-w3m:12974]
On Thu, 17 May 2018 18:58:09 +1000, Kevin Ryde wrote:
> This problem, from some time ago, has raised its head again in the
> current cvs ... w3m-view-header "=" doesn't display link target and
> "title" (Current Anchor: and Anchor Title:).

> Setting w3m-clear-display-while-reading to nil makes it ok again.

Hmm, no matter what its value is, I didn't observe "Current Anchor:"
or "Anchor Title:" being not appeared in the "about://header/" page
in the condition where they should be displayed.  But!

> Or
> under the debugger I saw w3m-about-header is reached with point moved to
> the top of the buffer, no longer the original place for (w3m-anchor).
> Yet more debugger suggested in w3m-goto-url maybe w3m-process-stop was
> moving point.  Not quite sure, though commenting it out is ok too, but I
> don't know how that's all supposed to work.

I could confirm that the point moved to min. only when I traced
`w3m-process-stop' using edebug.  Although I don't know why it
doesn't happen in the normal use case on me, I made the following
change in `w3m-process-stop' in CVS.  Does this do the trick?

--- w3m-proc.el~	2017-10-04 04:22:53.000000000 +0000
+++ w3m-proc.el	2018-05-18 07:20:21.164449100 +0000
@@ -300,5 +300,7 @@
     (when (and w3m-clear-display-while-reading
-	       (progn
-		 (goto-char (point-min))
-		 (looking-at "\n* *Reading [^\n]+\\.\\.\\.\\'")))
+	       (let ((pt (point)))
+		 (prog2
+		     (goto-char (point-min))
+		     (looking-at "\n* *Reading [^\n]+\\.\\.\\.\\'")
+		   (goto-char pt))))
       (let ((inhibit-read-only t))