I use emacs's session-capabilities (i.e. desktop-change-dir and desktop-save-in-desktop-dir) to persist various sessions across different projects where each one has its own “.emacs.dektop”-file. I want to store as well bookmarks in a session-specific way.
O.K. it already works out of the box for registers because they are stored directly in the desktop-file. But they lack the ability to name locations, to find them again properly if the files receive some editing, show that nice symbols in the line-numbering and so on. A single non-project-specific file for all my bookmarks is as well … absolutely not what I want. Those lists can get huge and mix up apples and pears.
Has someone a proposal on how to reach this goal?
Something I though of was, to use a hook when one of the two desktop-…-dir-functions above is called. However I don't know if there exists a hook that serves this purpose. Does someone of you know that? Potentially, this hook could then be used to set the path for the bookmark-file to the same folder where the “.emacs.desktop” resides in.
C-h v desktop--hook TABto find all the variables nameddesktop-*-hookand then check each one (there are only six) withC-h vto see where each one is run.