3

通常の方法でリモート ファイルにアクセスできません。

Cx Cf [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))))))))
4

1 に答える 1

1

C-x C-fバインドされているコマンドを確認します ( を使用C-h k)。標準バインディングfind-fileですか?(そうは聞こえません。)

interactiveそうでない場合は、その仕様を確認してください。このコマンドは、引数としてリストを受け取ることを期待していますが、代わりに (どのように見えるか) 文字列を受け取っています。

これはのinteractive仕様ですfind-file

(interactive
 (find-file-read-args "Find file: " (confirm-nonexistent-file-or-buffer)))

このようなコマンドのinteractive仕様に引数として文字列以外が含まれている場合、 、は引数に対して呼び出される関数 (の場合は)、またはその引数をラップして、デバッガーが呼び出された:C-x C-fM-x debug-on-entry THE-FUNCTIONTHE-FUNCTIONfind-file-read-argsfind-file

(progn (debug) (WHATEVER-WAS-THERE-BEFORE))

どちらの方法でも、ファイル名を読み取る対話的な部分のためにデバッガーが開き、デバッガーをウォークスルーして何が問題なのかを確認できます。

interactiveしかし、おそらく、コード (仕様) を調べるだけで問題を把握できます。コマンドへの引数 (それが何であれ) はリストであることが期待されますが、それは文字列です。

まず、ローカル ファイル名で何が起こるかを確認します。それもエラーになりますか?

私が気付いたもう1つのことは、[入力として入力したと言うものの前に、エラーが余分に報告することです。それも手がかりになるはずです。それが読んでいるとあなたが思うものは、それが読んだものではありません。

于 2013-12-18T01:07:28.927 に答える