我无法以通常的方式访问远程文件:
C-x C-f [server]:[path][file]
我抛出了这个错误:Wrong Type Argument: listp, [[server]:[path][file]
我甚至不确定如何进一步调试它。
任何帮助都是非常感谢的。
编辑:
尝试调试时的输出:
Debugger entered: nil
(progn (debug) (ido-mode t) (progn (ad-add-advice (quote completing-read) (quote (foo nil
t (advice lambda nil (if (boundp ...) ad-do-it (setq ad-return-value ...))))) (quote
around) (quote nil)) (ad-activate (quote completing-read) nil) (quote completing-read)) (define-key global-map [(meta 120)] (function (lambda nil (interactive) (call-interactively
(intern (ido-completing-read "M-x " (all-completions "" obarray ...))))))))
(if (fboundp (quote ido-mode)) (progn (debug) (ido-mode t) (progn (ad-add-advice (quote
completing-read) (quote (foo nil t (advice lambda nil (if ... ad-do-it ...)))) (quote
around) (quote nil)) (ad-activate (quote completing-read) nil) (quote completing-read))
(define-key global-map [(meta 120)] (function (lambda nil (interactive) (call-
interactively (intern (ido-completing-read "M-x " ...))))))))
eval-buffer() ; Reading at buffer position 16103
call-interactively(eval-buffer)
(lambda nil (interactive) (call-interactively (intern (ido-completing-read "M-x " (all-
completions "" obarray (quote commandp))))))()
call-interactively((lambda nil (interactive) (call-interactively (intern (ido-completing-
read "M-x " (all-completions "" obarray (quote commandp)))))) nil nil)
recursive-edit()
debug(debug)
implement-debug-on-entry()
* ido-find-file()
call-interactively(ido-find-file nil nil)这是来自我的init.el的:
(require 'ido)
(if (fboundp 'ido-mode)
(progn
(debug)
(ido-mode t)
(defadvice completing-read
(around foo activate)
(if (boundp 'ido-cur-list)
ad-do-it
(setq ad-return-value
(ido-completing-read
prompt
(all-completions "" collection predicate)
nil require-match initial-input hist def))))
(define-key global-map [(meta ?x)]
(lambda ()
(interactive)
(call-interactively
(intern
(ido-completing-read "M-x " (all-completions "" obarray 'commandp))))))))发布于 2013-12-18 09:07:29
检查(使用C-h k) C-x C-f绑定到什么命令。它是标准的绑定find-file吗?(听起来不像。)
如果没有,请检查它的interactive规范。该命令期望接收一个列表作为参数,但它却接收(看起来像是)一个字符串。
这是find-file的interactive规范
(interactive
(find-file-read-args "Find file: " (confirm-nonexistent-file-or-buffer)))如果您的C-x C-f命令的interactive规范有一个非字符串作为它的参数,那么您可以使用M-x debug-on-entry THE-FUNCTION,其中THE-FUNCTION是为参数调用的函数(在find-file的情况下是find-file-read-args),或者包装该参数以便调用调试器:
(progn (debug) (WHATEVER-WAS-THERE-BEFORE))无论采用哪种方式,调试器都将打开,用于读取文件名的交互部分,您可以遍历调试器以查看哪里出了问题。
但是也许您可以通过检查代码-- interactive规范来找出问题所在。命令的参数(不管它是什么)应该是一个列表,但它是一个字符串。
我会先看看本地文件名会发生什么。你也会收到错误吗?
我注意到的另一件事是,错误报告了一个额外的[,在您输入的内容前面。这也应该提供一个线索。你认为它正在读的并不是它所读到的。
https://stackoverflow.com/questions/20647107
复制相似问题