diff options
| author | Jim Porter | 2024-02-17 20:49:15 -0800 |
|---|---|---|
| committer | Jim Porter | 2024-03-06 14:36:23 -0800 |
| commit | 59e470dd5de6e75c4d3bb91c876c8540faf33fdb (patch) | |
| tree | 5dce2d1ef354996c9e7cb2d79bc19f87b126883a /doc | |
| parent | b12059e4c320f374735a9c00975ef12cb964043f (diff) | |
| download | emacs-59e470dd5de6e75c4d3bb91c876c8540faf33fdb.tar.gz emacs-59e470dd5de6e75c4d3bb91c876c8540faf33fdb.zip | |
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-before-browse-history-function): New option.
(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--before-browse): New function...
(eww, eww-follow-link, eww-readable): ... call it.
(eww-render): Don't set 'eww-history-position' here...
(eww--before-browse): ... instead, set it here.
(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.
(eww-delete-future-history, eww-clone-previous-history): New functions.
* test/lisp/net/eww-tests.el: New file.
* etc/NEWS: Announce this change.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/eww.texi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi index 5e69b11d347..d31fcf1802b 100644 --- a/doc/misc/eww.texi +++ b/doc/misc/eww.texi | |||
| @@ -192,6 +192,15 @@ history press @kbd{H} (@code{eww-list-histories}) to open the history | |||
| 192 | buffer @file{*eww history*}. The history is lost when EWW is quit. | 192 | buffer @file{*eww history*}. The history is lost when EWW is quit. |
| 193 | If you want to remember websites you can use bookmarks. | 193 | If you want to remember websites you can use bookmarks. |
| 194 | 194 | ||
| 195 | @vindex eww-before-browse-history-function | ||
| 196 | By default, when browsing to a new page from a ``historical'' one | ||
| 197 | (i.e.@: a page loaded by navigating back via @code{eww-back-url}), EWW | ||
| 198 | will first delete any history entries newer than the current page. This | ||
| 199 | is the same behavior as most other web browsers. You can change this by | ||
| 200 | customizing @code{eww-before-browse-history-function} to another value. | ||
| 201 | For example, setting it to @code{ignore} will preserve the existing | ||
| 202 | history entries and simply prepend the new page to the history list. | ||
| 203 | |||
| 195 | @vindex eww-history-limit | 204 | @vindex eww-history-limit |
| 196 | Along with the URLs visited, EWW also remembers both the rendered | 205 | Along with the URLs visited, EWW also remembers both the rendered |
| 197 | page (as it appears in the buffer) and its source. This can take a | 206 | page (as it appears in the buffer) and its source. This can take a |