GNU bug report logs -
#71450
[PATCH] Wrong eww-history-position after desktop restore if within history
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71450 in the body.
You can then email your comments to 71450 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
jporterbugs <at> gmail.com, bug-gnu-emacs <at> gnu.org
:
bug#71450
; Package
emacs
.
(Sun, 09 Jun 2024 12:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
James Thomas <jimjoe <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
jporterbugs <at> gmail.com, bug-gnu-emacs <at> gnu.org
.
(Sun, 09 Jun 2024 12:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
- emacs -Q
- M-x eww RET <any website> RET
- RET (on any link)
- l
- M-x desktop-save RET <any directory> RET
- C-x C-c (exit)
- emacs -Q
- M-x desktop-read RET <the above directory> RET
- g (to reload the webpage)
- RET (on any link) fails
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.38, cairo version 1.18.0) of 2024-06-09 built on
user-Inspiron-3493
Repository revision: e9a0256a556622474bcbb015f88d790666db2cc9
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Ubuntu 23.10
Configured using:
'configure --with-native-compilation=aot'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_IN
value of $XMODIFIERS: @im=ibus
locale-coding-system: iso-latin-1-unix
Major mode: VC dir
Minor modes in effect:
rcirc-track-minor-mode: t
display-time-mode: t
pdf-occur-global-minor-mode: t
vc-dir-git-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
desktop-environment-mode: t
server-mode: t
erc-track-mode: t
erc-ring-mode: t
erc-netsplit-mode: t
erc-menu-mode: t
erc-match-mode: t
erc-log-mode: t
erc-list-mode: t
erc-irccontrols-mode: t
erc-noncommands-mode: t
erc-move-to-prompt-mode: t
erc-readonly-mode: t
erc-button-mode: t
erc-fill-mode: t
erc-stamp-mode: t
erc-autojoin-mode: t
savehist-mode: t
midnight-mode: t
icomplete-mode: t
fido-mode: t
erc-networks-mode: t
display-battery-mode: t
desktop-save-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
This is a patch that I think is simple enough to forgo the extensive
testing which it hasn't been subjected to.
[0001-Correct-eww-history-position-in-desktop-restore.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#71450
; Package
emacs
.
(Sun, 09 Jun 2024 21:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 71450 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#71450
; Package
emacs
.
(Mon, 10 Jun 2024 01:11:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 71450 <at> debbugs.gnu.org (full text, mbox):
[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?
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:
[alternate.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
Regards,
James
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#71450
; Package
emacs
.
(Tue, 11 Jun 2024 19:13:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 71450 <at> debbugs.gnu.org (full text, mbox):
[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
Reply sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
You have taken responsibility.
(Sun, 16 Jun 2024 00:04:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
James Thomas <jimjoe <at> gmx.net>
:
bug acknowledged by developer.
(Sun, 16 Jun 2024 00:04:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 71450-done <at> debbugs.gnu.org (full text, mbox):
On 6/10/2024 2:36 PM, James Thomas via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> Here's an updated patch, which I've tested somewhat:
Thanks, this looks good to me, so I've merged it as 65b7f87a31d. Closing
this bug now.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 14 Jul 2024 11:24:09 GMT)
Full text and
rfc822 format available.
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.