From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-15?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: tramp Date: Thu, 22 Aug 2002 18:05:31 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1030032442 9547 127.0.0.1 (22 Aug 2002 16:07:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 22 Aug 2002 16:07:22 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17huUR-0002Tq-00 for ; Thu, 22 Aug 2002 18:07:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17huxN-00076k-00 for ; Thu, 22 Aug 2002 18:37:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17huVa-0004ay-00; Thu, 22 Aug 2002 12:08:30 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17huTK-0004UX-00 for emacs-devel@gnu.org; Thu, 22 Aug 2002 12:06:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17huSp-0004RL-00 for emacs-devel@gnu.org; Thu, 22 Aug 2002 12:06:10 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17huSo-0004RF-00; Thu, 22 Aug 2002 12:05:38 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g7MG5bb08924; Thu, 22 Aug 2002 18:05:37 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id SAA02899; Thu, 22 Aug 2002 18:05:32 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 04F453B1CB; Thu, 22 Aug 2002 18:05:31 +0200 (CEST) Original-To: Miles Bader In-Reply-To: (Miles Bader's message of "13 Aug 2002 14:52:57 +0900") Original-Lines: 70 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6766 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6766 Miles Bader writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: >> > tramp: Looking for pattern ^\(([^) ]*)\|[^> ]*[>]\)\s-* >>=20 >> This looks like your shell-prompt-pattern. Is it? > > Ah, perhaps it is. Since shell-prompt-pattern is basically not used anym= ore, > I had forgotten that I had one. However, in this case it's still clearly > wrong, since it's not _my_ shell that's being started, but root's. Right. >> At this point, Tramp is again waiting for shell-prompt-pattern, and >> this shell prompt does not match the regexp above. >>=20 >> It used to be that Tramp tried to grok some common shell prompts in >> addition to shell-prompt-pattern. Maybe I should re-add this feature. > > I think it _definitely_ should match common shell prompts, as > `shell-prompt-pattern' is quite likely to be wrong, for the reasons I gave > above: Okay, Tramp now has its own variable, tramp-shell-prompt-pattern, that users can set. The default value is the same as the default value for shell-prompt-pattern, so it should match the prompts that your examples showed. > (1) It's not used by shell-mode anymore, so it's going to suffer bit-rot. Ah. Hm. shell-mode just assumes that everything on the last line is a prompt, right? Hm. But I think it's not possible for Tramp to assume something similar. It is vital for Tramp to wait until it sees a shell prompt before sending something to the remote shell. If you send input to the remote shell too early, things go wrong in a quite horrible way (depending on the remote login program that you are using). But maybe waiting for the shell prompt is not the right thing to do. What could Tramp do instead? (After Tramp has ascertained that it is indeed talking to the remote shell, it sets the shell prompt to a special value and then uses that, and this mechanism works well. I haven't heard any complaints, yet, at least :-) > (2) In many cases, a shell started by tramp will be in a `different > context' than a normal user-shell, and so will have a different > prompt anyway. > > Probably it ought to be possible to modify this on a per-connection-type = and > per-machine basis (but presumably that will be handled by the whizzy conf= ig > mechanism that will added to address other problems, right?). Is it really necessary to modify the regexp like this? Isn't it enough for the user to set one value which covers all alternatives? If possible, I would like to avoid having too many parameters that are based on method or machine. But I'm having similar arguments about tramp-remote-path. It's also just one variable, and people are requesting me to make it configurable on a per-host basis. But I think it is sufficient to have one global value which contains all the directories on all the hosts. kai --=20 A large number of young women don't trust men with beards. (BFBS Radio)