Perhaps I'm kind of misusing that feature – but I find desktop files rather handy to be kept with projects. Clearly, it doesn't make much sense then to store absolute paths for the files to be opened; rather, I would like paths relative to the desktop file's own folder, so I can move the entire project folder al gusto and always load the desktop file within.
Emacs has indeed no problem opening such “local desktop files”, like
(desktop-create-buffer 206
"src/Main.hs"
"Main"
'haskell-mode
... )
However, as soon as I do desktop-save
(e.g. because I added a new file to the project), all the stored paths will get changed to absolute format
(desktop-create-buffer 206
"/home/me/right/now/the/project/is/stored/here/src/Main.hs"
"Main"
'haskell-mode
... )
It's not hard to undo this by hand or with a quick sed
command, but that's quite annoying. Can I tell emacs not to store those paths in absolute format?