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

Re: w3m-view-header `=' on a linked image



In [emacs-w3m : No.11750] Kevin Ryde wrote:
> With the current cvs looking at the foo.html below, if point is on the
> "gpl" image then pressing `=' w3m-view-header doesn't show the href link
> target.  I hoped that it would, the same as it does on linked text.

Fixed (hopefully) in CVS.  The past change I made in
`w3m-history-restore-position' was a workaround for the problem:

In [http://emacs-w3m.namazu.org/ml/msg11549.html] Jidanni wrote:
> View an image with a long URL like
> http://maps.googleapis.com/maps/api/staticmap?sensor=false&language=zh-TW&size=600x400&markers=label:K|23.04108,120.23714&maptype=hybrid&markers=label:L|23.04171,120.24174&center=23.04171,120.24174&zoom=15
> Now hit q.

(You may want to do `M->' before `q'.)

> Now do M-x w3m.
> Notice how the image is now far shifted to the left, and we need to type
> a C-a to move it back to where we can see it.

And what I did was:

In [http://emacs-w3m.namazu.org/ml/msg11550.html] I wrote:
> I realized Emacs lies about the column number in the results of
> the functions `current-column', `window-hscroll', etc. if there
> are images displayed.  So, I've made a change so as not to do
> hscroll in the current line in which images are displayed when
> restoring the window layout that a user used previously.  Thanks.

In [emacs-w3m : No.11750] Kevin Ryde wrote:
> I struck this when experimenting with `=' to show an image location url,
> per the diff below (not properly tested yet :-).

Works nicely.  I've added it to CVS.

> Then I noticed not only it doesn't work but neither does the existing
> code that shows just an anchor target.

Indeed.  Thanks for pointing.

> A bit of tracing suggests point might be moved when the code goes to
> look for the properties.  I wondered if it was due to
> w3m-history-restore-position doing something different on a position
> with an image, but I can't tell.  Would that about:/header thing extract
> its information before any save/restore anyway?