我在 macOS 上使用通过 homebrew 安装的 Emacs 26.1 版。
当我使用 tramp 通过 ssh 编辑文件时,它经常挂起(例如,每 20 分钟一次)。当我点击Ctrl-x-s
保存文件(或触发自动备份)时,tramp 开始保存文件。但是,它挂起一条消息
Waiting for prompts from remote shell… \
如果我打Ctrl-g
,它似乎没有效果。我按了第二个 Ctrl-g,emacs 进入后台并显示一条消息
zsh: suspended emacs
我尝试fg
命令将 emacs 带回前面:
$ fg
[1] + continued emacs
Emacs is resuming after an emergency escape.
Auto-save? (y or n) y
Auto-save done
Abort (and dump core)? (y or n) n
Continuing...
并且 emacs 继续以空白屏幕挂起。因此,我能采取的唯一方法是对第二个问题回答“y”并中止 Emacs 进程。
我试图检查tramp的调试缓冲区,但是我无法读取它,因为打印的行太多并且调试缓冲区不滚动,并且emacs不接受任何击键,除了Ctrl-g
.
我的 emacs.el 中有以下几行
(require 'tramp)
(setq tramp-default-method "ssh")
(setq tramp-verbose 5)
(add-to-list 'backup-directory-alist
(cons tramp-file-name-regexp nil))
Emacs 在升级之前运行良好。(不记得以前的版本了……)
你有什么建议或提示吗?提前致谢。
编辑:
这是 emacs 进程终止时显示的回溯(通过对上面的第二个问题回答“y”)
[1] + continued emacs
Emacs is resuming after an emergency escape.
Auto-save? (y or n) y
Auto-save done
Abort (and dump core)? (y or n) y
Fatal error 6: Abort trapMemory^H^H^H^N^P
Backtrace:
0 emacs 0x0000000100096b2d emacs_backtrace + 157
1 emacs 0x000000010007e9cd terminate_due_to_signal + 110
2 emacs 0x00000001000955ba init_baud_rate + 0
3 emacs 0x0000000100087a98 kbd_buffer_nr_stored + 0
4 emacs 0x00000001000965fb deliver_process_signal + 61
5 libsystem_platform.dylib 0x00007fffa595eb3a _sigtramp + 26
6 ??? 0xb0e07c5c8dafe0b2 0x0 + 12745323682414452914
7 emacs 0x000000010013d491 really_call_select + 88
8 emacs 0x000000010013d42f thread_select + 58
9 emacs 0x0000000100124702 wait_reading_process_output + 3244
10 emacs 0x00000001001239f3 Faccept_process_output + 447
11 emacs 0x00000001000eaa8c funcall_subr + 299
12 emacs 0x00000001000ea16f Ffuncall + 653
13 emacs 0x000000010011c258 exec_byte_code + 1563
14 emacs 0x00000001000ea114 Ffuncall + 562
15 emacs 0x000000010011c258 exec_byte_code + 1563
16 emacs 0x00000001000ea114 Ffuncall + 562
17 emacs 0x000000010011c258 exec_byte_code + 1563
18 emacs 0x00000001000ea114 Ffuncall + 562
19 emacs 0x000000010011c258 exec_byte_code + 1563
20 emacs 0x00000001000ea114 Ffuncall + 562
21 emacs 0x000000010011c258 exec_byte_code + 1563
22 emacs 0x00000001000ea114 Ffuncall + 562
23 emacs 0x00000001000e9dfd Fapply + 651
24 emacs 0x00000001000ea16f Ffuncall + 653
25 emacs 0x000000010011c258 exec_byte_code + 1563
26 emacs 0x00000001000ea114 Ffuncall + 562
27 emacs 0x00000001000e9dfd Fapply + 651
28 emacs 0x00000001000ea16f Ffuncall + 653
29 emacs 0x000000010011c258 exec_byte_code + 1563
30 emacs 0x00000001000ea114 Ffuncall + 562
31 emacs 0x00000001000e9dfd Fapply + 651
32 emacs 0x00000001000ea16f Ffuncall + 653
33 emacs 0x000000010011c258 exec_byte_code + 1563
34 emacs 0x00000001000ea114 Ffuncall + 562
35 emacs 0x00000001000e9dfd Fapply + 651
36 emacs 0x00000001000ea16f Ffuncall + 653
37 emacs 0x000000010011c258 exec_byte_code + 1563
38 emacs 0x00000001000ea114 Ffuncall + 562
39 emacs 0x00000001000e9dfd Fapply + 651
40 emacs 0x00000001000ea16f Ffuncall + 653