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

Re: history position after w3m-browse-url



In [emacs-w3m : No.11901] Kevin Ryde wrote:
> 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.

Thanks.  Not only `w3m-browse-url' but also at least the following
commands will need to run it, too:

w3m-view-parent-page
w3m-scroll-up-or-next-url
w3m-scroll-down-or-previous-url
w3m-gohome
w3m-find-file
w3m-db-history
w3m-history

Maybe it's better to modify the condition that decides whether
`w3m-goto-url' runs `w3m-history-store-position' (currently it
runs it only when called interactively).  But in my experience,
it likely causes another bug.

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

It should be called in the w3m-mode buffer.  So, `w3m-browse-url'
should go to the w3m-mode buffer, if any, in advance.
I'm going to work on this...