unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: merlyn@stonehenge.com (Randal L. Schwartz)
Cc: emacs-devel@gnu.org
Subject: Re: tramp mode not working on OSX with dev HEAD
Date: Mon, 08 Mar 2010 17:58:13 +0100	[thread overview]
Message-ID: <876356wy1m.fsf@gmx.de> (raw)
In-Reply-To: 86lje2suor.fsf@blue.stonehenge.com

merlyn@stonehenge.com (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	other threads:[~2010-03-08 16:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 22:15 tramp mode not working on OSX with dev HEAD Randal L. Schwartz
2010-03-06  8:03 ` Michael Albinus
2010-03-07 22:39   ` Randal L. Schwartz
2010-03-08  8:00     ` Michael Albinus
2010-03-08 15:24       ` Randal L. Schwartz
2010-03-08 16:58         ` Michael Albinus [this message]
2010-03-08 17:03           ` Randal L. Schwartz
2010-03-08 17:19             ` Michael Albinus
2010-03-08 17:40               ` Tramp Mode not working connecting to OpenSolaris (was Re: tramp mode not working on OSX with dev HEAD) Randal L. Schwartz
2010-03-08 17:48                 ` Tramp Mode not working connecting to OpenSolaris Randal L. Schwartz
2010-03-08 18:11                   ` David Kastrup
2010-03-08 21:38                     ` Michael Albinus
2010-03-08 21:35                 ` Michael Albinus
2010-03-08 21:43                   ` Randal L. Schwartz
2010-03-09  6:34                     ` Michael Albinus
2010-03-09 15:49                       ` Randal L. Schwartz
2010-03-09 15:51                       ` Randal L. Schwartz
2010-03-10 17:04                         ` Michael Albinus
2010-03-10 17:08                           ` Randal L. Schwartz
2010-03-10 20:20                             ` Michael Albinus
2010-03-11 16:53                               ` Randal L. Schwartz
2010-03-11 17:53                                 ` Davis Herring
2010-03-11 17:58                                   ` Randal L. Schwartz
2010-03-11 19:37                                     ` Michael Albinus
2010-03-11 19:49                                       ` Randal L. Schwartz
2010-03-11 20:11                                         ` Michael Albinus
2010-03-11 21:21                                           ` Randal L. Schwartz
2010-03-12  5:38                                             ` Michael Albinus
2010-03-12 16:24                                               ` Chong Yidong
2010-03-13 19:34                                                 ` Michael Albinus
2010-03-13 19:56                                                   ` Stefan Monnier
2010-03-14 18:35                                               ` Randal L. Schwartz
2010-03-14 18:51                                                 ` Michael Albinus
2010-03-15  0:03                                                   ` Randal L. Schwartz
2010-03-09 21:26           ` tramp mode not working on OSX with dev HEAD Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=876356wy1m.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=merlyn@stonehenge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).