tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp-find-file-exists-command problem with ntemacs 22.0.92.1


From: Patrik Jonsson
Subject: Re: tramp-find-file-exists-command problem with ntemacs 22.0.92.1
Date: Mon, 28 May 2007 13:04:44 -0700
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Patrik Jonsson wrote:
> Michael Albinus wrote:
>   
>> Patrik Jonsson <address@hidden> writes:
>>
>> Hi Patrik,
>>
>>     
>>>> Hmm. Could you, please, restart Emacs with "emacs -q"? Then apply
>>>>
>>>> (setq debug-on-error t
>>>>       debug-on-quit t)
>>>>
>>>> and rerun the test please. It should give you a backtrace, which might
>>>> be helpful.
>>>>         
>>> sure:
>>>
>>> Debugger entered--Lisp error: (error "Couldn't find command to check if
>>> file exists")
>>>   signal(error ("Couldn't find command to check if file exists"))
>>>   error("Couldn't find command to check if file exists")
>>>   tramp-find-file-exists-command(nil "plink" nil "governator")
>>>       
>> There is still nothing which should prevent Tramp from executing the
>> next command. Mysterious.
>>
>> Could we apply some cross checks? Run Emacs 21.3 and Tramp 2.0.55, and
>> run Emacs 22.0 and Tramp 2.0.48. Please make sure that there are no
>> byte-compiled Tramp files. And run "emacs -q", as always.
>>     
>
> Sorry for the slow reply, been traveling.
>
> If I run emacs 22 and try to use 2.0.48 I get the following error when
> trying to auto-complete a tramp filename:
>
> apply: Wrong number of arguments: (lambda (filename directory) "Like
> `file-name-completion' for tramp files." (try-completion filename
> (mapcar (quote list) (file-name-all-completions filename directory)))), 3
>
> If I run emacs 21.3 and copy the tramp 2.0.55 lisp files from emacs22
> into the 21.3 site-lisp directory, I get:
>
> tramp: Finding command to check if file exists
> if: Couldn't find command to check if file exists
> setq: End of file during parsing
>
> which looks like the same problem as before.
>
> /Patrik
>   
Hi again,
I never heard anything back about this, so I gave up and reverted to
using the old emacs/tramp that works. I just tried downloading the
latest ntemacs 22 cvs snapshot (070524) to see if whatever the problem
was had fixed itself, but it hasn't.

Currently, it SAYS the problem is that it can't find ls on the other
end. I try to open a file with /plink:host:partially_completed_name_here
and hit tab, it logs in and then just returns to the minibuffer without
completing. If I hit tab again, it says "Couldn't find remote 'ls'
command."  However, the problem is still that it can't figure out how to
check if a file exists. Debug-on-error gives this rather long backtrace:

Debugger entered--Lisp error: (error "Couldn't find command to check if
file exists")
  signal(error ("Couldn't find command to check if file exists"))
  error("Couldn't find command to check if file exists")
  (if (or (and ... ... ...) (and ... ... ...) (and ... ... ...) (and ...
... ...)) nil (error "Couldn't find command to check if file exists"))
  (unless (or (and ... ... ...) (and ... ... ...) (and ... ... ...) (and
... ... ...)) (error "Couldn't find command to check if file exists"))
  (let ((existing ...) (nonexisting ...)) (unless (or ... ... ... ...)
(error "Couldn't find command to check if file exists")))
  tramp-find-file-exists-command(nil "plink" nil "governator")
  tramp-post-connection(nil "plink" nil "governator")
  (let* ((default-directory ...) (coding-system-for-read ...) (p ...)
(found nil)) (tramp-set-process-query-on-exit-flag p nil) (set-buffer
buf) (tramp-process-actions p multi-method method user host
tramp-actions-before-shell 60) (tramp-message 7 "Initializing remote
shell") (tramp-open-connection-setup-interactive-shell p multi-method
method user host) (tramp-post-connection multi-method method user host))
  (let ((process-environment ...) (bufnam ...) (buf ...) (login-program
...) (login-args ...) (real-host host)) (when (string-match
"\\([^#]*\\)#\\(.*\\)" host) (setq login-args ...) (setq real-host ...))
(setenv "TERM" tramp-terminal-type) (setenv "PS1" "$ ") (let* (... ...
... ...) (tramp-set-process-query-on-exit-flag p nil) (set-buffer buf)
(tramp-process-actions p multi-method method user host
tramp-actions-before-shell 60) (tramp-message 7 "Initializing remote
shell") (tramp-open-connection-setup-interactive-shell p multi-method
method user host) (tramp-post-connection multi-method method user host)))
  (progn (when multi-method (error "Cannot multi-connect using rsh
connection method")) (tramp-pre-connection multi-method method user host
tramp-chunksize) (if (and user ...) (tramp-message 7 "Opening connection
for address@hidden using %s..." user host method) (tramp-message 7 "Opening
connection at %s using %s..." host method)) (let (... ... ... ... ...
...) (when ... ... ...) (setenv "TERM" tramp-terminal-type) (setenv
"PS1" "$ ") (let* ... ... ... ... ... ... ...)))
  (unwind-protect (progn (when multi-method ...) (tramp-pre-connection
multi-method method user host tramp-chunksize) (if ... ... ...) (let ...
... ... ... ...)) (set-match-data save-match-data-internal (quote
evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ... ...
... ...) (set-match-data save-match-data-internal ...)))
  (save-match-data (when multi-method (error "Cannot multi-connect using
rsh connection method")) (tramp-pre-connection multi-method method user
host tramp-chunksize) (if (and user ...) (tramp-message 7 "Opening
connection for address@hidden using %s..." user host method) (tramp-message 7
"Opening connection at %s using %s..." host method)) (let (... ... ...
... ... ...) (when ... ... ...) (setenv "TERM" tramp-terminal-type)
(setenv "PS1" "$ ") (let* ... ... ... ... ... ... ...)))
  tramp-open-connection-rsh(nil "plink" nil "governator")
  funcall(tramp-open-connection-rsh nil "plink" nil "governator")
  (let ((process-connection-type tramp-process-connection-type))
(funcall (tramp-get-method-parameter multi-method ... user host ...)
multi-method method user host))
  (if (and p (processp p) (memq ... ...)) nil (when (and p ...)
(delete-process p)) (let (...) (funcall ... multi-method method user host)))
  (unless (and p (processp p) (memq ... ...)) (when (and p ...)
(delete-process p)) (let (...) (funcall ... multi-method method user host)))
  (let ((p ...) last-cmd-time) (save-excursion (set-buffer ...) (when
... ... ... ...)) (unless (and p ... ...) (when ... ...) (let ... ...)))
  tramp-maybe-open-connection(nil "plink" nil "governator")
  (or neveropen (tramp-maybe-open-connection multi-method method user host))
  tramp-send-command(nil "plink" nil "governator" "cd ~; pwd" t)
  (let ((uname ...) (fname ...)) (when (and ... ...) (setq uname ...))
(set-buffer (tramp-get-buffer multi-method method user host))
(erase-buffer) (tramp-send-command multi-method method user host (format
"cd %s; pwd" uname) t) (tramp-wait-for-output) (goto-char (point-min))
(setq uname (buffer-substring ... ...)) (setq localname (concat uname
fname)) (erase-buffer))
  (progn (let (... ...) (when ... ...) (set-buffer ...) (erase-buffer)
(tramp-send-command multi-method method user host ... t)
(tramp-wait-for-output) (goto-char ...) (setq uname ...) (setq localname
...) (erase-buffer)))
  (if (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname) (progn (let
... ... ... ... ... ... ... ... ... ...)))
  (when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'" localname) (let (...
...) (when ... ...) (set-buffer ...) (erase-buffer) (tramp-send-command
multi-method method user host ... t) (tramp-wait-for-output) (goto-char
...) (setq uname ...) (setq localname ...) (erase-buffer)))
  (save-excursion (when (string-match "\\`\\(~[^/]*\\)\\(.*\\)\\'"
localname) (let ... ... ... ... ... ... ... ... ... ...)) (while
(string-match "//" localname) (setq localname ...)) (tramp-let-maybe
directory-sep-char 47 (let ... ...)))
  (let* ((v ...) (multi-method ...) (method ...) (user ...) (host ...)
(localname ...)) (unless (file-name-absolute-p localname) (setq
localname ...)) (save-excursion (when ... ...) (while ... ...)
(tramp-let-maybe directory-sep-char 47 ...)))
  (with-parsed-tramp-file-name name nil (unless (file-name-absolute-p
localname) (setq localname ...)) (save-excursion (when ... ...) (while
... ...) (tramp-let-maybe directory-sep-char 47 ...)))
  (if (not (tramp-tramp-file-p name)) (tramp-run-real-handler (quote
expand-file-name) (list name nil)) (with-parsed-tramp-file-name name nil
(unless ... ...) (save-excursion ... ... ...)))
  tramp-handle-expand-file-name("/plink:governator:" "c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/")
  apply(tramp-handle-expand-file-name ("/plink:governator:"
"c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/"))
  (if fn (apply (cdr fn) args) (tramp-run-real-handler operation args))
  (let ((fn ...)) (if fn (apply ... args) (tramp-run-real-handler
operation args)))
  (progn (let (...) (if fn ... ...)))
  (unwind-protect (progn (let ... ...)) (set-match-data
save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ...)
(set-match-data save-match-data-internal ...)))
  (save-match-data (let (...) (if fn ... ...)))
  (let ((tramp-locker t)) (save-match-data (let ... ...)))
  (progn (setq tramp-locked t) (let (...) (save-match-data ...)))
  (unwind-protect (progn (setq tramp-locked t) (let ... ...)) (setq
tramp-locked tl))
  (let ((tl tramp-locked)) (unwind-protect (progn ... ...) (setq
tramp-locked tl)))
  tramp-sh-file-name-handler(expand-file-name "/plink:governator:"
"c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/")
  apply(tramp-sh-file-name-handler expand-file-name
("/plink:governator:" "c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/"))
  (cond ((and completion ...) (tramp-run-real-handler operation args))
((and completion ... ...) t) (foreign (apply foreign operation args)) (t
(tramp-run-real-handler operation args)))
  (let* ((v ...) (multi-method ...) (method ...) (user ...) (host ...)
(localname ...)) (cond (... ...) (... t) (foreign ...) (t ...)))
  (with-parsed-tramp-file-name filename nil (cond (... ...) (... t)
(foreign ...) (t ...)))
  (let* ((filename ...) (completion ...) (foreign ...))
(with-parsed-tramp-file-name filename nil (cond ... ... ... ...)))
  (progn (let* (... ... ...) (with-parsed-tramp-file-name filename nil
...)))
  (unwind-protect (progn (let* ... ...)) (set-match-data
save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal ...)) (unwind-protect (progn ...)
(set-match-data save-match-data-internal ...)))
  (save-match-data (let* (... ... ...) (with-parsed-tramp-file-name
filename nil ...)))
  tramp-file-name-handler(expand-file-name "/plink:governator:"
"c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/")
  read-file-name-internal("c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs//plink:governator:sun"
"c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/" nil)
  minibuffer-complete()
  call-interactively(minibuffer-complete)
  read-file-name("Find file: " nil "c:\\Documents and
Settings\\patrik\\Desktop\\emacs-from-cvs-070524\\emacs/" nil)
  find-file-read-args("Find file: " nil)
  call-interactively(find-file)

I have stepped through with the debugger and concluded that
file-exists-p indeed returns nil for all four of the cases in
tramp-find-file-exists-command, but from there I don't know what to do
anymore. The remote machine is a FC6 x86_64, and /usr/bin/test and ls -d
both work.

What's weird is I would assume the debug buffer to show it trying to
send something to the other end to figure out whether the commands work
or not, but there's nothing after "# Finding command to check if file
exists".

If anyone can help me track this down I'd much appreciate it, I'm using
tramp constantly so without it working I'm not able to even think of
moving up from my old v21... :-(

Thanks,

/Patrik

*** tramp debug buffer contents ***

# Opening connection at governator using plink...
# Waiting for prompts from remote shell
# Waiting 60s for prompt from remote shell
# Found remote shell prompt.
# Initializing remote shell
$ unset HISTORY
unset HISTORY
]0;address@hidden:address@hidden ~]$ $ unset correct
unset correct
]0;address@hidden:address@hidden ~]$ $ unset autocorrect
unset autocorrect
]0;address@hidden:address@hidden ~]$ $ exec env 'ENV=' 'PS1=$
' /bin/sh
# Waiting 30s for remote `/bin/sh' to come up...
exec env 'ENV=' 'PS1=$ ' /bin/sh
$ exec env 'ENV=' 'PS1=$ ' /bin/sh
$
# Setting up remote shell environment
$ stty -inlcr -echo kill '^U'
stty -inlcr -echo kill '^U'
$ $ echo foo
foo
$ $ TERM=dumb; export TERM
$
# Checking remote host type for `send-process-string' bug
$ (uname -sr) 2>/dev/null
Linux 2.6.19-1.2895.fc6
$
# Determining coding system
$ echo foo ; echo bar
foo
bar
$
# Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export
HISTFILE; export HISTSIZE'
$ HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export
HISTSIZE
$
# Waiting 30s for `set +o vi +o emacs'
$ set +o vi +o emacs
$
# Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
$ unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null
$
# Waiting 30s for `unset CDPATH'
$ unset CDPATH
$
# Setting shell prompt
$ PS1='
///87131fdd2d43f9a7c6595d78af4d3085
'; PS2=''; PS3=''
$ echo ~root
/root
# Remote `/bin/sh' groks tilde expansion, good
# Finding command to check if file exists


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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