Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save layout shell/terminal state between sessions

So any shell/terminal buffer turns into a text or scratch between sessions (if I close and open spacemacs again)

I'm doing TDD and it's quite convenient to have mocha running tests in a vsplit window on the side of a workspace.

What would be the best approach to that?

Thanks

like image 365
Daniel Khoroshko Avatar asked Jun 24 '26 23:06

Daniel Khoroshko


1 Answers

You are right. *shell* buffer will be reverted into *scratch* when you close emacs. (in this case I guessed that you used desktop.el to achieve persistent sessions)

Unfortunately dekstop.el doesn't support saving *shell* buffers. So it will be reverted to *scratch* when you try to save it.

The good news is you can use desktop+ which can achieve your needs. Quoting from documentation

Desktop sessions by default save only buffers associated to "real" files. Desktop+ >extends this by handling also "special buffers". The list of currently supported s pecial buffer types is:

- compilation buffers (in `compilation-mode`)
- terminal buffers (in `term-mode`)
- org agenda & todo lists (in `org-agenda-mode`)
- indirect buffers (a.k.a clones).
- man pages (in `Man-mode`)
- shell buffers (in `shell-mode`)

PS: I don't use spacemacs. According to your explanation, I think spacemacs activate desktop.el by default

like image 64
azzamsa Avatar answered Jun 27 '26 13:06

azzamsa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!