GNU bug report logs - #71450
[PATCH] Wrong eww-history-position after desktop restore if within history

Previous Next

Package: emacs;

Reported by: James Thomas <jimjoe <at> gmx.net>

Date: Sun, 9 Jun 2024 12:41:02 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: James Thomas <jimjoe <at> gmx.net>
To: 71450 <at> debbugs.gnu.org
Cc: Jim Porter <jporterbugs <at> gmail.com>
Subject: Re: bug#71450: [PATCH] Wrong eww-history-position after desktop
 restore if within history
Date: Tue, 11 Jun 2024 03:06:31 +0530
[Message part 1 (text/plain, inline)]
Jim Porter wrote:

> On 6/9/2024 5:23 AM, James Thomas via Bug reports for GNU Emacs, the
> Swiss army knife of text editors wrote:
>> This is a patch that I think is simple enough to forgo the extensive
>> testing which it hasn't been subjected to.
>
> Thanks for the patch.
>
>> +          :history-position
>> +          (cl-position
>> +           (elt history eww-history-position)
>> +           rval :test #'eww-desktop-history-duplicate))))
>
> Two questions here:
>
> 1. Is that the right test function? I'd have expected 'eq', since we
> want to find the position where our history index has moved to, right?
>
> 2. Should this part check for 'eww-desktop-remove-duplicates' too? If
> that option is nil, I think we could avoid the 'cl-position' call. Or
> maybe lift the 'eww-desktop-remove-duplicates' call outside of the
> 'list' and just construct two totally different lists in the THEN/ELSE
> blocks.

Here's an updated patch, which I've tested somewhat:

[0001-Account-for-duplicate-removal-on-restoring.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
Regards,
James

This bug report was last modified 336 days ago.

Previous Next


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