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

Keep cursor at the same position after deleting from the list

Open velppa opened this issue 3 years ago • 2 comments

Hello Adam, thank you for the package (and for many others), I found it more clean and usable than any other similar packages I tried (gum road, better-jumper).

What I found annoying is when deleting an item from the list the cursor goes to the top, so this PR tries to address this problem. I'm new to Emacs Lisp, so the implementation can be not good enough.

velppa avatar Oct 26 '21 06:10 velppa

Hi Pavel,

Thanks for your patience, and thanks for the kind words. I'm glad it's useful to you.

The implementation is fine, I would only suggest naming the variable pos rather than this, which is more common in this case. :)

alphapapa avatar Nov 27 '21 19:11 alphapapa

Why not use save-excursion ? I think this is exactly its purpose.

(save-excursion
  (tabulated-list-revert))

nagy avatar Feb 17 '22 18:02 nagy