Open chansey97 opened 2 weeks ago
better-jumper has a better-jumper-add-jump-behavior option (for replace and append).
Dogears tries to roughly imitate browsers' behavior, but it's not necessarily intended to work exactly the same way. The list of places is added to, but places are not popped off the list as they are returned to; it's closer to an Emacs-style ring than a browser's back-button history list.
Technically I suppose browsers don't pop items off the list as the user goes back, but if the user goes back a few pages and then clicks a link on a page, the old "forward history" is discarded. So potentially we could implement a tree of places and fork it, similarly to the Emacs undo list (e.g. visualized with vundo
). However, that would mean a lot of additional complexity in implementation and UI, which I doubt would be worth it.
Having said that, there may be some lingering bugs in this functionality. For example, maybe dogears-remember
should update dogears-position
when it remembers a new place; I wonder how doing that would affect the example behavior you showed.
I appreciate your scrutiny of these features. Having written Dogears, and while I have dogears-mode
activated all the time, I don't actually use it to go forward/back as much as I expected to, so it needs more testing to wring out these little issues.
Dogears' backward / forward behavior is different from browsers and other IDEs.
For example, set
(setq dogears-position-delta 50)
in init.el and put the following text in *scratch*.Check the behavior:
Why the step 7 is bad? Because it is inconsistent with Web Browsers. You can try the same steps in https://en.wikipedia.org/wiki/Wiki via Firefox.
I also tried some IDEs (e.g. IntelliJ IDEA), they follow Firefox's behavior.
Thanks to the clean code of dogears.el, adapting it to match the behavior of Web Browsers might be not difficult. For example,
dogears-remember
can delete old places beforedogears-position
.Do you think it is necessary for dogears.el to use the Web Browser behavior? Or be an option?
Just for discussion.