Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bookmark in LIFO order not work as expect #41

Open
snowman opened this issue May 28, 2022 · 0 comments
Open

bookmark in LIFO order not work as expect #41

snowman opened this issue May 28, 2022 · 0 comments

Comments

@snowman
Copy link
Contributor

snowman commented May 28, 2022

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?")))
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant