Closed declantsien closed 3 years ago
I found an alternative/cleaner way to resolve my issue without pushing this PR. Closing this one.
(defun ebuku--restore-pos (orig-fun &rest args)
(let ((scroll-pos (line-number-at-pos (window-start)))
(cursor-pos (line-number-at-pos))
(res (apply orig-fun args)))
(beginning-of-buffer)
(scroll-up (- scroll-pos 1))
(goto-line cursor-pos)
res))
(advice-add 'ebuku--delete-bookmark-sentinel :around #'ebuku--restore-pos)
I found it convenient to let
ebuku
to remember the line info after a refresh. Especially helpful when I am trying to delete a bookmark.