From: Kai.Grossjohann@CS.Uni-Dortmund.DE (K. ) - 2002-06-02 08:40:44
|
Horsley Tom <Tom...@cc...> writes: >> Does one send a kermit command to the remote end, then send an escape >> char to Kermit, then tell the Kermit to send (receive) the file? Hm. >> Maybe the current file transfer mechanism needs a little bit of >> tweaking to allow this. > > I haven't thought about it much, but I sort of envision defining > "sessions" as kermit scripts. The local emacs would run kermit > on the local system as a subprocess, feeding it the session script > argument. The session script would do all the connecting, logging > in, starting remote kermit, etc with the kermit scripting > capabilities. It could start the remote kermit in server mode and > the local kermit script could then use the kermit INPUT command > to read commands from tramp and act on them. Hm? This sounds as if you need to implement in Kermit lots of things that Tramp already does reasonably well. I'm not sure that this is the right solution. Tramp executes a lot of different shell commands during normal activity. Even if you don't use filename completion. So the only thing I really need is: (1) How do I get a shell prompt from Kermit? This goes into a special connection function. Look at tramp-open-connection-rsh and tramp-open-connection-telnet for some examples. Probably it is enough to start Kermit, then send "telnet otherhost" to it and then do like tramp-open-connection-telnet does. I don't know how to open other kinds of connection from Kermit. (2) How do I transfer a file with Kermit, once I have that remote shell prompt? This would have to go in tramp-handle-write-region (for sending the file) and tramp-handle-insert-file-contents (for receiving it). In particular, what is NOT the right way is to start Kermit for each file transfer. That seems way too expensive. But maybe I have misunderstood your idea. Maybe the hint to INPUT (which I don't know) means that it is like a shell prompt? If I understood right: is it now clearer why it doesn't make sense to make an extra command prompt for Tramp? Tramp sends commands to a remote shell. kai -- Silence is foo! |