branch: master
commit 236021dd97436464277b3d07ddd39bff6dedc80b
Author: Juergen Hoetzel <[email protected]>
Commit: Juergen Hoetzel <[email protected]>
ivy.el (ivy--virtual-buffers): Ensure bookmarks are loaded
Also don't use internal bookmark data structures: The file format
might change again.
---
ivy.el | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/ivy.el b/ivy.el
index 88dd5fa..dc6d595 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3174,22 +3174,15 @@ CANDS is a list of strings."
(defun ivy--virtual-buffers ()
"Adapted from `ido-add-virtual-buffers-to-list'."
+ (require 'bookmark)
(unless recentf-mode
(recentf-mode 1))
- (let ((bookmarks (and (boundp 'bookmark-alist)
- (copy-sequence bookmark-alist)))
- virtual-buffers)
+ (let (virtual-buffers)
+ (bookmark-maybe-load-default-file)
(dolist (head (append
(copy-sequence recentf-list)
- (delq nil (mapcar
- (lambda (bookmark)
- (let (file)
- (when (setq file (assoc 'filename bookmark))
- (unless (string= (cdr file)
- " - no file -")
- (cons (car bookmark)
- (cdr file))))))
- bookmarks))))
+ (delq nil (mapcar #'bookmark-get-filename
+ (copy-sequence bookmark-alist)))))
(let ((file-name (if (stringp head)
head
(cdr head)))