Skip to content

bookmark in LIFO order not work as expect #41

@snowman

Description

@snowman

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?")))
  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions