Repository navigation
Show ghostel bookmarks properly in the bookmark list - #614
Merged
Merged
Conversation
The bookmark record stored its directory under a private thisdir key inherited from vterm, and the handler carried no type property, so bookmark-bmenu-list rendered a blank Type column and the fallback "-- Unknown location --" for every ghostel bookmark. Store the directory under location, the key bookmark-location reads, and register the handler type so the Type column reads "Ghostel". Records saved by earlier versions keep their thisdir key and no longer restore; the handler is only a few weeks old and reads the new key exclusively. The type property is inert before Emacs 29, which introduced the column. Fixes #613
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #613.
bookmark-bmenu-list(C-x r l) showed ghostel bookmarks with a blankType column and
-- Unknown location --in the File column.Two causes:
thisdirkeyinherited from vterm.
bookmark-locationreadslocation(orfilename), so it fell through to its unknown-location fallback.ghostel--bookmark-handlercarried nobookmark-handler-typesymbolproperty, which is what
bookmark-type-from-full-recordreads to fillthe Type column.
Both fixed as suggested in the issue: the directory moves to
location,and the handler gets
(put 'ghostel--bookmark-handler 'bookmark-handler-type "Ghostel")— matching howshell.el,esh-mode.el, and the rest of Emacs core do it.Compatibility
Bookmarks saved by an earlier ghostel keep their
thisdirkey and willno longer restore; the handler reads
locationexclusively. Bookmarksupport only landed a few weeks ago, so this is deliberate rather than
carrying a fallback forever.
The
putis inert before Emacs 29, which introduced the Type column.locationis read by every supported version, so nothing needs aversion guard or a compat shim.
Verification
make -j8 allis green. The maker test now assertsbookmark-location— the value the File column actually renders — rather than just the raw
property, plus a new test for the handler type. Rendering the real
bookmark-bmenu-listover a ghostel record now gives: