Search code examples
emacsbookmarksorg-mode

How can I make a singleton bookmark in my org file?


I have an org-mode task list that I keep in version control. I would like to press a key and turn the current position into a bookmark target that I will be able to access anywhere I have the list checked out, regardless of other changes that have been made to the document. This is why (bookmark-set) will not work.

Additionally I would like to ensure that this target only occurs once in the file. If I put the target at a different position I want the original target to go away.

Essentially, I want to combine features of Emacs bookmarks (the singleton aspect), and org-mode links (more robust persistence). What's the best way to do this?


Solution

  • The best solution I've been able to come up with is to use the text <<<BOOKMARK>>>, and to search for it when necessary. At some point I might write some functions that place this bookmark and delete it from elsewhere.