+(defun elpher-get-bookmarks-page (renderer)
+ "Getter which displays the history page (RENDERER must be nil)."
+ (when renderer
+ (elpher-visit-previous-page)
+ (error "Command not supported for bookmarks page"))
+ (let* ((names (seq-filter (lambda (name)
+ (let ((record (bookmark-get-bookmark-record name)))
+ ;; record
+ (eq (alist-get 'handler record) 'elpher-bookmark-jump)
+ ))
+ (bookmark-all-names))))
+ (elpher-with-clean-buffer
+ (insert " ---- Elpher Bookmarks ---- \n\n")
+ (if names
+ (dolist (name names)
+ (when names
+ (let* ((url (alist-get 'location (bookmark-get-bookmark-record name)))
+ (address (elpher-address-from-url url)))
+ (elpher-insert-index-record name address))))
+ (insert "No bookmarked pages found.\n"))
+ (insert "\n --------------------------\n\n"
+ "Select an entry or press 'u' to return to the previous page.")
+ (elpher-restore-pos))))
+
+(defun elpher-show-bookmarks ()
+ "Show elpher bookmarks."
+ (interactive)
+ (elpher-visit-page
+ (elpher-make-page "Elpher Bookmarks"
+ (elpher-make-special-address 'bookmarks))))