Subject: Re: bug#69232: 30.0.50; [PATCH] EWW history navigation gets caught in a loop

From: James Thomas <[email-masked]>
Date: Sat, 24 Feb 2024 19:45:49 +0530

Jim Porter wrote:

> From 0f2528482527262ff59153595d7a3f10517153ca Mon Sep 17 00:00:00 2001
> From: Jim Porter <[email-masked]>
> Date: Sat, 17 Feb 2024 20:49:15 -0800
> Subject: [PATCH] When navigating through history in EWW, don't keep adding to
>  'eww-history'
>
> This resolves an issue where navigating back and then forward kept
> adding new history entries so you could never hit the "end" (bug#69232).
>
> * lisp/net/eww.el (eww-history-position): Add docstring.
> (eww-mode-map, eww-context-menu): Use correct predicates for when to
> enable back/forward.
> (eww-save-history): Save history entry in its original place when
> viewing a historical page.
> (eww-back-url): Set 'eww-history-position' based on the result of
> 'eww-save-history'.
> (eww-forward-url): Set 'eww-history-position' directly, since
> 'eww-save-history' no longer adds a new entry in this case.
>
> * etc/NEWS: Announce this change.
> ---
>  etc/NEWS        |  8 ++++++++
>  lisp/net/eww.el | 39 ++++++++++++++++++++++++++++-----------
>  2 files changed, 36 insertions(+), 11 deletions(-)

One possible problem with this patch, I realize now, is that if you
navigate backward ('l') and then visit another link there, the new page
is added to the very end of history rather than the immediate next
position. This would be confusing if you, then, navigate back and find
that it's not the page from which you followed the link. Perhaps the
original code was a hack around this?

--
James