Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support restore dired buffers #6

Open
samb233 opened this issue May 4, 2023 · 1 comment
Open

Support restore dired buffers #6

samb233 opened this issue May 4, 2023 · 1 comment

Comments

@samb233
Copy link

samb233 commented May 4, 2023

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)))
@leafarbelm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants