emacs - 在 session 之间保存布局外壳/终端状态

标签 emacs spacemacs

所以任何 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/

相关文章:

跨双监视器的emacs高效缓冲区切换

vim - 为什么您更喜欢 spacemacs 而不是在 'evil' 模式下运行的 emacs?

emacs - org-agenda 的习惯被彩色红色列覆盖。为什么?

emacs - 暂时禁用 Spacemacs 中的 Vim 键绑定(bind)

spacemacs - 覆盖 spacemacs 中默认键绑定(bind)的最佳方法是什么?

emacs - 如何将移位键绑定(bind)到 LaTeX 数学模式?

emacs - 如何让 flycheck 在 emacs lisp 中找到所需的文件?

templates - 如何使用 Emacs+AUCTeX 创建(自动插入)LaTeX 模板?

emacs - 使用组织模式导出时,目录 div 位置错误