Is there a function that, for a given location (e.g. the ongoing file/line number) returns an existing bookmark (if any)?
I've looked at the list of functions in bookmark and bookmark+ libraries and could not find one.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
I'm not sure what you're asking. You can have any number of bookmarks at a given buffer position or file position.
bookmark-get-position returns the recorded position of a given bookmark. You can filter the bookmarks in the current
bookmark-alist with a function that tests that position.
With Bookmark+ you also have commands such as
bmkp-bookmarks-lighted-at-point, which returns a list of the bookmarks highlighted at the cursor position:
bmkp-bookmarks-lighted-at-pointis an interactive compiled Lisp function in
It is bound to
C-x x =,
menu-bar file bookmark bookmarks-here bmkp-bookmarks-lighted-at-point,
menu-bar file bookmark highlight bmkp-bookmarks-lighted-at-point.
(bmkp-bookmarks-lighted-at-point &optional POSITION FULLP MSGP)
Return a list of the bookmarks highlighted at point.
Include only those in the current bookmark list (
- With no prefix arg, return the bookmark names.
- With a prefix arg, return the full bookmark data.
Interactively, display the info.
- Use the bookmarks at optional arg
- Optional arg
FULLPmeans return full bookmark data.
- Optional arg
MSGPmeans display the info.
bmkp-choose-bookmark-lighted-at-pointis a compiled Lisp function in
(bmkp-choose-bookmark-lighted-at-point &optional POSITION NOERRORP)
Return the name of a bookmark lighted at
If there is more than one such, prompt user to choose one.
POSITIONis a buffer position to use instead of point.
Raise an error if there is no highlighted bookmark present, unless optional arg
nil, in which case return