所以任何 shell/terminal 缓冲区都会在 session 之间变成文本或 scratch(如果我再次关闭并打开 spacemacs)
我正在做 TDD,让 mocha 在工作区一侧的 vsplit 窗口中运行测试非常方便。
最好的方法是什么?
谢谢
最佳答案
你是对的。当您关闭 emacs 时,*shell*
缓冲区将恢复为 *scratch*
。 (在这种情况下,我猜你使用了 desktop.el 来实现持久 session )
不幸的是 dekstop.el 不支持保存 *shell*
缓冲区。因此,当您尝试保存它时,它将恢复为 *scratch*
。
好消息是您可以使用 desktop+可以满足您的需求。 引用文档
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`)
附言:我不使用 spacemacs。根据你的解释,我认为 spacemacs 默认激活 desktop.el
关于emacs - 在 session 之间保存布局外壳/终端状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45528831/