GNU bug report logs - #69232
30.0.50; [PATCH] EWW history navigation gets caught in a loop

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 18 Feb 2024 18:24:16 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #83 received at 69232 <at> debbugs.gnu.org (full text, mbox):

From: James Thomas <jimjoe <at> gmx.net>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 69232 <at> debbugs.gnu.org
Subject: Re: bug#69232: 30.0.50; [PATCH] EWW history navigation gets caught
 in a loop
Date: Fri, 01 Mar 2024 17:26:54 +0530
James Thomas wrote:

> I'm using it with the following:

It had a small error; corrected version:

--8<---------------cut here---------------start------------->8---

(defun eww-clone-previous-history-upto-first ()
  "Like `eww-clone-previous-history', but only clone up to the first
occurrence of the current page in the history."
  (when (> eww-history-position 1)
    (setq eww-history
	  (append
	   (cl-subseq
	    eww-history
	    (cl-position-if
	     (lambda (elt) (equal (plist-get elt :url) (eww-current-url)))
	     eww-history :from-end))
           eww-history))))

(setq eww-before-browse-function #'eww-clone-previous-history-upto-first)

--8<---------------cut here---------------end--------------->8---

Regards,
James




This bug report was last modified 1 year and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.