在缓冲区中重新启动 shell 进程

Dav*_*hme 5 shell emacs text-editors elisp

在 emacs 中,我经常打开多个 shell 缓冲区并使用 rename-buffer 来跟踪它们。有时我会因为敲太多 ^D 而无意中关闭了 shell,或者我在一个自动超时非活动 shell 的系统上。有没有办法在同一个缓冲区中启动一个新的 shell?因为我已经从shell 中重命名了缓冲区,键入 Mx shell 将在新的shell缓冲区中启动一个 shell ,而不是当前缓冲区。

Dav*_*hme 5

使用 M- 运行以下 emacs lisp 代码,而不是 Mx shell:

(shell (current-buffer))
Run Code Online (Sandbox Code Playgroud)