Skip to content

Commit 236021d

Browse files
ivy.el (ivy--virtual-buffers): Ensure bookmarks are loaded
Also don't use internal bookmark data structures: The file format might change again.
1 parent a5cd13b commit 236021d

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

ivy.el

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3174,22 +3174,15 @@ CANDS is a list of strings."
31743174

31753175
(defun ivy--virtual-buffers ()
31763176
"Adapted from `ido-add-virtual-buffers-to-list'."
3177+
(require 'bookmark)
31773178
(unless recentf-mode
31783179
(recentf-mode 1))
3179-
(let ((bookmarks (and (boundp 'bookmark-alist)
3180-
(copy-sequence bookmark-alist)))
3181-
virtual-buffers)
3180+
(let (virtual-buffers)
3181+
(bookmark-maybe-load-default-file)
31823182
(dolist (head (append
31833183
(copy-sequence recentf-list)
3184-
(delq nil (mapcar
3185-
(lambda (bookmark)
3186-
(let (file)
3187-
(when (setq file (assoc 'filename bookmark))
3188-
(unless (string= (cdr file)
3189-
" - no file -")
3190-
(cons (car bookmark)
3191-
(cdr file))))))
3192-
bookmarks))))
3184+
(delq nil (mapcar #'bookmark-get-filename
3185+
(copy-sequence bookmark-alist)))))
31933186
(let ((file-name (if (stringp head)
31943187
head
31953188
(cdr head)))

0 commit comments

Comments
 (0)