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

Bookmarks created by burly.el, can not read by emacs 28.0.90 after emacs restarted, but those bookmarks can be found when run command list-bookmarks #46

Closed
zw963 opened this issue Jan 3, 2022 · 8 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@zw963
Copy link

zw963 commented Jan 3, 2022

I create some bookmarks use burly. it works, i can saw those bookmarks saved on my ~/.emacs.d/bookmarks.

sure i can restore those bookmarks if i am not restart emacs.

but, when i reboot my emacs, then run burly-bookmark-windows, i get nothing.

Following is a ivy screenshot.

image

Then, when i run list-bookmarks, i can see bookmarks there.

image

I can restore bookmarks pressing enter on it.

In fact, when i try to rerun burly-bookmark-window, i saw those bookmarks again.

image

I can try fix it with add following code into (bury-bookmark-names) method.

image

But, there maybe a better solution.

Thank you.

@alphapapa
Copy link
Owner

Hi,

Thanks, maybe something changed in Emacs 28 about the way bookmarks are loaded, and calling list-bookmarks happens to fix it. Could you check the emacs.git log and see if there is a commit that seems to be related?

@alphapapa alphapapa self-assigned this Mar 1, 2022
@alphapapa alphapapa added bug Something isn't working help wanted Extra attention is needed labels Mar 1, 2022
@ParetoOptimalDev
Copy link

I checked emacs.git's log and didn't see anything obvious, but will post it shortly.

I also noticed that having a scratch buffer in org-mode seems to make burly fail for some reason, but perhaps that should be it's own issue.

Going to see the diff between the values in emacs27/emacs28 where the error is happening and post that as well.

@ParetoOptimalDev
Copy link

I can reproduce this in emacs 27.2 with emacs -Q and burly-20211005.1159.

It's because bookmark-alist is null and list-bookmarks calls (bookmark-maybe-load-default-file) and populates it when you execute list-bookmarks.

Should burly also call bookmarks-maybe-load-default-file? I'm guessing many users are using desktop-save-mode and wouldn't have noticed this.

@alphapapa
Copy link
Owner

but, when i reboot my emacs, then run burly-bookmark-windows, i get nothing.

IIUC, the bug here, to the extent that there is one, is that, if burly-bookmark-windows is executed before list-bookmarks is executed (or any other command that causes the bookmarks file to be loaded), there are no Burly bookmarks listed as completion candidates for the bookmark-creating command.

However, this does not mean that already-created bookmarks are unreadable, as the issue title describes.

Do I understand correctly?

@zw963
Copy link
Author

zw963 commented Mar 17, 2022

However, this does not mean that already-created bookmarks are unreadable, as the issue title describes.

Yes, you can consider it as unvisible by burly.el only before run list-bookmarks.

@tfree87
Copy link
Contributor

tfree87 commented Jun 7, 2022

I am seeing this behavior in my Emacs 28 as well as I have recently removed desktop-save-mode from my configuration.

It does appear that Burly cannot access the bookmarks and it is not just a lack of completion candidates. If I manually type a bookmark that I know exists (e.g. Burly: test), it will give the error message Invalid bookmark Burly: test.

tfree87 added a commit to tfree87/burly.el that referenced this issue Jun 7, 2022
@tfree87
Copy link
Contributor

tfree87 commented Jun 7, 2022

I am a user of Consult and I found looking through the code for that project that, as @ParetoOptimalDev mentioned, the function (bookmark-maybe-load-default-file) is utilized to intialize the bookmarks and get a list of completion candidates for consult-bookmarks.

I have added this function to the definition of burly-bookmark-names and tested it and it works in populating the list of bookmarks for Burly. I will add this to my fork and create a pull request.

@alphapapa
Copy link
Owner

Thanks to all.

@alphapapa alphapapa added this to the 0.3 milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants