Closed zw963 closed 11 months ago
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?
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.
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.
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?
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.
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
.
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.
Thanks to all.
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.
Then, when i run
list-bookmarks
, i can see bookmarks there.I can restore bookmarks pressing enter on it.
In fact, when i try to rerun
burly-bookmark-window
, i saw those bookmarks again.I can try fix it with add following code into (bury-bookmark-names) method.
But, there maybe a better solution.
Thank you.