For example, when there are three bookmarks in the current buffer,
and then remove the last bookmark, then run bm-previous,
the point goes to the first bookmark instead of the second bookmark.
The script to reproduce:
;; FILE: /tmp/reproduce.el
;;
;; $ emacs -Q -nw -l bm.el /tmp/reproduce.el
;;
;; In Emacs:
;; 1. M-x end-of-buffer RET
;; 2. M-x edebug-defun RET
(progn
;; prepare bookmarks
(require 'bm)
(save-excursion
(goto-line 1) (bm-bookmark-add)
(goto-line 3) (bm-bookmark-add)
(goto-line 5) (bm-bookmark-add)
(bm-bookmark-remove) ;; remove the 3rd bookmark
)
(progn
(goto-char (point-max))
(setq bm-in-lifo-order t)
(bm-previous)
(when (equal (point) (point-min))
(message "Point in the first bookmark, but shouldn't be in the second bookmark?")))
)
For example, when there are three bookmarks in the current buffer,
and then remove the last bookmark, then run
bm-previous,the point goes to the first bookmark instead of the second bookmark.
The script to reproduce: