bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#71450: [PATCH] Wrong eww-history-position after desktop restore if w


From: James Thomas
Subject: bug#71450: [PATCH] Wrong eww-history-position after desktop restore if within history
Date: Mon, 10 Jun 2024 05:03:59 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

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?

I'd thought that this would be more robust because it was used for the
original removal. But I guess 'eq' would be enough since only succeeding
duplicates are removed.

> 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.

In fact, the following patch was the one with which I got it working
originally, before favouring the earlier one for simplicity:

Attachment: alternate.patch
Description: Alternate patch

Regards,
James

reply via email to

[Prev in Thread] Current Thread [Next in Thread]