[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.1.8); cannot open file

From: Michael Albinus
Subject: Re: tramp (2.1.8); cannot open file
Date: Tue, 20 Mar 2007 22:20:22 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

"Qichen Huang" <address@hidden> writes:


> I use plink to connect ssh server. The connection is fine, I can list the
> directory on remote server.
> But I can not open files. The error message is:
> 'PC-look-for-include-file: Wrong type argument: stringp, nil'
> (setq debug-on-error t)
> the Backtrace message is (I can't copy the complete byte-code part because
> of the illegel characters):
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> string-match("[\"<]\\([^\"<>]*\\)[\">]?$" nil)
> PC-look-for-include-file()

In `PC-look-for-include-file', buffer-file-name is checked. It is nil,
therefore the error. The comment in `PC-look-for-include-file' says
that it shall be set already when the function is called. Hmm.

> run-hook-with-args-until-success(PC-look-for-include-file)
> byte-code("ࣃ℀ᜀ" [filename buf error file-exists-p file-readable-p
> kill-buffer signal file-error "File is not readable"
> run-hook-with-args-until-success find-file-not-found-functions t] 4)
> find-file-noselect-1(#<buffer .vimrc<2>>
> "/plink:address@hidden:/home/huangq/.vimrc"
> nil nil "/plink:address@hidden:/home/huangq/.vimrc" (50574 (-1 0)))

You try to open "/plink:address@hidden:/home/huangq/.vimrc". An
error is raised, because it seems to be detected that this file is not

> ([cl-struct-tramp-file-name "plink" "huangq" ""
> "/home/huangq/.vimrc"]
> ("file-directory-p" nil) ("file-exists-p" t)
> ("file-attributes-integer"
> (nil 1 1000 27 (17916 42687) (17915 30532) (17915 30532) 47 "-rw-r--r--" nil
> 50574 (-1 0))
> )
> ("file-truename" "/plink:address@hidden:/home/huangq/.vimrc")
> ("file-readable-p" t))

OTOH, Tramp's cache says the file is readable.

So we have 2 problems: why does Tramp mean that .vimrc is not
readable? And why is buffer-file-name nil in that case?

I cannot see more from your provided information (although it's
already a good starting point). Could you, please, rerun the test with
tramp-verbose set to 8? Could you, please, provide both buffers
*tramp/plink address@hidden and *debug tramp/plink
address@hidden then?

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]