Question

I have been using perspectives package in emacs (from Nathan Weizenbaum, https://github.com/nex3/perspective-el). I save my emacs session on exit so that it saves the existing buffers and loads them up on next start. The line added in .emacs file to achieve this is : (desktop-save-mode 1). But it doesn't save perspectives, so that all the saved buffers open under a single perspective, when emacs is started. Is there any implementation that will achieve the saving of perspectives between emacs sessions?

Was it helpful?

Solution

desktop-save-mode is provided by package desktop which comes with emacs, it is not provided by perspective.el. Desktop mode can save and restore your buffers (with emacs 24.4 it can also save your windows and frames) but does not provide 'named window configurations'. Perhaps you can use bookmarks+ for this as @Drew suggests but I have never tried it.

The package perspectives does not provide a way save and load perspectives. See this issue. As an alternative I would like to suggest you the package workgroups2, it similar to perpective.el (it calls perspectives workgroups) and provides that feature you want.

OTHER TIPS

This might be an alternative for you, depending on what you are looking for:

Starting with Emacs 24.4 (which will be released soon, and for which development snapshots are available), when you save an Emacs desktop (see desktop-save-mode and Bookmark+ desktop bookmarks), you can optionally save frame, window, and buffer states. Restoring a desktop then restores these as well (as far as possible).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top