emacs-devel
[Top][All Lists]
Advanced

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

Re: tramp mode not working on OSX with dev HEAD


From: Michael Albinus
Subject: Re: tramp mode not working on OSX with dev HEAD
Date: Mon, 08 Mar 2010 17:58:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

address@hidden (Randal L. Schwartz) writes:

> Sorry..  I did a few things that worked (finding a directory works).
> I then truncated the logs, and failed on finding a file that was there.

No problem. The traces can be analyzed now. If you want to do it
yourself, check for the level (6) traces. These are the sent commands,
and their reply.

07:20:10.701231 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' 
PS1=\#\$\  PS2='' PS3='' /bin/sh
07:20:10.816572 tramp-wait-for-regexp (6) #
#$

On your remote host, /bin/sh has been opened. The next commands are
fine. Until here:

07:20:12.899867 tramp-send-command (6) # tramp_perl_file_name_all_completions 
() {
/usr/bin/perl -e 'sub case {
 my $str = shift;
 if ($ARGV[2]) {
  return lc($str);
 }
 else {
  return $str;
 }
}
opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n");
@files = readdir(d); closedir(d);
foreach $f (@files) {
 if (case(substr($f, 0, length($ARGV[1]))) eq case($ARGV[1])) {
  if (-d "$ARGV[0]/$f") {
   print "$f/\n";
  }
  else {
   print "$f\n";
  }
 }
}
print "ok\n"
' "$1" "$2" "$3" 2>/dev/null
} 2>/dev/null; echo tramp_exit_status $?

Tramp tries to declare a script in the shell.

07:20:13.748322 tramp-wait-for-regexp (1) # File error: Process has died

And there was an error; the shell died. It looks like your shell does
not like bourne-shell syntax.

Please check the following: Open a terminal on the remote host, and call
"/bin/sh". Then paste the following lines literally:

--8<---------------cut here---------------start------------->8---
tramp_perl_file_name_all_completions () {
/usr/bin/perl -e 'sub case {
 my $str = shift;
 if ($ARGV[2]) {
  return lc($str);
 }
 else {
  return $str;
 }
}
opendir(d, $ARGV[0]) || die("$ARGV[0]: $!\nfail\n");
@files = readdir(d); closedir(d);
foreach $f (@files) {
 if (case(substr($f, 0, length($ARGV[1]))) eq case($ARGV[1])) {
  if (-d "$ARGV[0]/$f") {
   print "$f/\n";
  }
  else {
   print "$f\n";
  }
 }
}
print "ok\n"
' "$1" "$2" "$3" 2>/dev/null
}
--8<---------------cut here---------------end--------------->8---

See, whether there is an error. If there is no error, test the script in
the shell:

--8<---------------cut here---------------start------------->8---
tramp_perl_file_name_all_completions /tmp
--8<---------------cut here---------------end--------------->8---

That's it.

Best regards, Michael.




reply via email to

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