Emacs 错误
当我尝试使用 Tramp 2.1.9 在另一台计算机上打开文件时,它会将我登录到计算机并显示该文件,但随后会出现在迷你缓冲区中:
File mode specification error: (wrong-number-of-arguments #[(filename) "\306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314
^K^L\315$-\207" [filename v method user host localname tramp-tramp-file-p tramp-dissect-file-name tramp-file-name-method tramp-file-name-user tramp-file-name-host tramp-file-name-localname tramp-make-tramp-file-name ""] 5 ("/usr/local/share/emacs/s\
ite-lisp/tramp.elc" . 133124)] 3)
Directory-local variables error: (wrong-number-of-arguments #[(filename) "\306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314
^K^L\315$-\207" [filename v method user host localname tramp-tramp-file-p tramp-dissect-file-name tramp-file-name-method tramp-file-name-user tramp-file-name-host tramp-file-name-localname tramp-make-tramp-file-name ""] 5 ("/usr/local/share/emacs/s\
ite-lisp/tramp.elc" . 133124)] 3)
Error: (wrong-number-of-arguments #[(filename) \306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314
^K^L\315$-\207 [filename v method user host localname tramp-tramp-file-p tramp-dissect-file-name tramp-file-name-method tramp-file-name-user tramp-file-name-host tramp-file-name-localname tramp-make-tramp-file-name ] 5 (/usr/local/share/emacs/site-\
lisp/tramp.elc . 133124)] 3)
而且我无法移动该文件。有人经历过这个吗?我的 .emacs 文件中唯一与流浪者相关的行是:
(require 'tramp)
(setq tramp-default-method "ssh")
When I try to open a file on another machine using tramp 2.1.9, it logs me into the machine and shows the file, but then this appears in the minibuffer:
File mode specification error: (wrong-number-of-arguments #[(filename) "\306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314
^K^L\315$-\207" [filename v method user host localname tramp-tramp-file-p tramp-dissect-file-name tramp-file-name-method tramp-file-name-user tramp-file-name-host tramp-file-name-localname tramp-make-tramp-file-name ""] 5 ("/usr/local/share/emacs/s\
ite-lisp/tramp.elc" . 133124)] 3)
Directory-local variables error: (wrong-number-of-arguments #[(filename) "\306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314
^K^L\315$-\207" [filename v method user host localname tramp-tramp-file-p tramp-dissect-file-name tramp-file-name-method tramp-file-name-user tramp-file-name-host tramp-file-name-localname tramp-make-tramp-file-name ""] 5 ("/usr/local/share/emacs/s\
ite-lisp/tramp.elc" . 133124)] 3)
Error: (wrong-number-of-arguments #[(filename) \306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314
^K^L\315$-\207 [filename v method user host localname tramp-tramp-file-p tramp-dissect-file-name tramp-file-name-method tramp-file-name-user tramp-file-name-host tramp-file-name-localname tramp-make-tramp-file-name ] 5 (/usr/local/share/emacs/site-\
lisp/tramp.elc . 133124)] 3)
And I can't move around the file. Anyone experienced this? The only tramp-related lines in my .emacs file are:
(require 'tramp)
(setq tramp-default-method "ssh")
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 shell 提示符似乎出现在该错误字符串中。如果远程 shell 提示符是一个问题,那么我对 trapmp 能够加载文件感到有点惊讶。但是,诊断远程 shell 提示符是否存在问题的一种简单方法是暂时移开您的
.bashrc
(或/bin/sh
所拥有的任何 shell 自定义项)加载)。这是关于 远程 shell 设置。
至于解决方案(如果提示是一个问题),我已经积累了一组返回到简单提示的条件(但我不再记得使用哪些测试来避免特定问题)。
(在进行任何 shell 自定义之前,我还测试了
! -z "$PS1"
,但我非常确定流浪 shell 是交互式的。)It looks like your shell prompt is appearing in that error string. If the remote shell prompt is an issue, I'm a little surprised that tramp gets as far as loading the file. But, one easy way to diagnose whether the remote shell prompt is an issue is to temporarily move aside your
.bashrc
(or whatever shell customizations you have that/bin/sh
would load).Here's the tramp manual on remote shell setup.
As for a solution (if the prompt is an issue), I have accumulated a set of conditions for falling back to a simple prompt (but I no longer recall which tests are used to avoid particular issues).
(I also test for
! -z "$PS1"
before doing any shell customizations, but I'm pretty sure the tramp shell is interactive.)