dogears.el icon indicating copy to clipboard operation
dogears.el copied to clipboard

Dogears.el's behavior differs from Web Browsers and IDEs

Open chansey97 opened this issue 8 months ago • 2 comments

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

Conferences       ....................................................................

Legal environment ....................................................................

See also          ....................................................................

Notes             ....................................................................

References        ....................................................................

Further reading   ....................................................................

External links    ....................................................................

Check the behavior:

  1. Put the cursor at "External links" and M-x dogears-remember
  2. Put the cursor at "Further reading" and M-x dogears-remember
  3. Put the cursor at "References" and M-x dogears-remember
  4. M-x dogears-back, the cursor will jump to "Further reading"
  5. Put the cursor at "Conferences" and M-x dogears-remember
  6. M-x dogears-back, the cursor will jump to "Further reading" (GOOD)
  7. M-x dogears-forward, the cursor will jump to "References" (BAD)
  8. M-x dogears-forward, the cursor will jump to "Conferences" (GOOD, but should skip step 7)

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.

  1. Click "External links" link
  2. Click "Further reading" link
  3. Click "References" link
  4. Click "Go back" button, the web page jump to "Further reading"
  5. Click "Conferences" link
  6. Click "Go back" button, the web page jump to "Further reading" (GOOD)
  7. Click "Go forward" button, the web page jump to "Conferences" (GOOD)

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 before dogears-position.

Do you think it is necessary for dogears.el to use the Web Browser behavior? Or be an option?

Just for discussion.

chansey97 avatar Jun 19 '24 20:06 chansey97