thierryvolpiatto / psession

Yet another package for emacs persistent sessions
67 stars 13 forks source link

restore session on keybind or defun #8

Closed habamax closed 6 years ago

habamax commented 6 years ago

Is it possible to have session restored on demand? Using some kebinding or command?

for ex:

(use-package psession
  :commands (psession-restore-last-session)
  :config
  (psession-mode 1) ; autosaving session on emacs quit
  (psession-restore-last-session)) ; if you really need session restored when you open emacs

So if I remove this non-existent command psession-restore-last-session I will end up having fresh emacs. But if needed I can recall the command and have it restored.

Or maybe to have psession-save-mode that only saves current session and additional command to restore it?

thierryvolpiatto commented 6 years ago

Maxim Kim notifications@github.com writes:

Is it possible to have session restored on demand? Using some kebinding or command?

No, I don't want to add such command to avoid confusion, the purpose of this package is to work in background without querying the user once psession modes are enabled. If you want for some reason to restart emacs without loading previous session, just comment the (psession-mode 1) line in your config and restart emacs.

-- Thierry

habamax commented 6 years ago

Ok, that is fair.