bookmark-view icon indicating copy to clipboard operation
bookmark-view copied to clipboard

Support restore dired buffers

Open samb233 opened this issue 2 years ago • 1 comments

Hello and thanks for making this package! I tried this package and like it!

I'm using Emacs29. The only problem I have is when I use bookmark-view with dired buffers, the dired buffers cannot be restored after restart, it told me Buffer xxx not found.

I found that bookmark-make-record-default is not used as dired buffers have nil buffer-file-name.

I tweaked bookmark-view--make-record, it works, but since I'm not familiar with emacs lisp, I don't know if this is the right way to do it.

(defun bookmark-view--make-record ()
  "Return a new bookmark record for the current buffer.
  The current buffer must not have a backing file."
-   (if (and (not buffer-file-name)
+  (if (and (not (bookmark-buffer-file-name))
           (eq bookmark-make-record-function #'bookmark-make-record-default))
      `(,(bookmark-buffer-name)
        (buffer . ,(buffer-name))
        (handler . ,#'bookmark-view-handler-fallback))
    (bookmark-make-record)))

samb233 avatar May 04 '23 08:05 samb233

Was having the same issue when bookmarking-view with dired buffers, this solved. It would be nice to have in in the package.

leafarbelm avatar Feb 07 '24 15:02 leafarbelm