[Top][All Lists]

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

tramp methods using synchronous processes?

From: Eduardo Ochs
Subject: tramp methods using synchronous processes?
Date: Tue, 3 Jan 2006 16:14:15 -0300

Hello tramp list,

How do I add a method to tramp that doesn't run an asynchronous

Ok, let me explain (sorry for the length)...

I'm having to use a crippled w32 environment at a job, and tramp's
default telnet and ftp methods don't work there due to a bug that I'm
trying to track down - I have asked for help at the #emacs IRC
channel, and reported it (actually something that I think that is
related to it!) at:

but got no answers...

I'm currently using a workaround - that I will describe soon - and I
thought that adding support for it to tramp as a new method would be a
good way to become more familiar with tramp's innards... Can you give
me some pointers and hints to start with?

Here's the workaround. As the default ftp client at this win2k box is
broken I wrote a Lua script called myftp.lua that uses the support for
ftp that comes with the "luasocket" library; myftp.lua knows how to
expand some file names - "machine1:foo" becomes
"ftp://myuser:address@hidden/foo";, for example -, and
when myftp.lua is invoked with two arguments it works as a cp that can
handle both local and remote files - like this -

  lua.exe myftp.lua foo/bar machine1:/home/foo/bar
  lua.exe myftp.lua machine1:/home/foo/bar foo/bar
  lua.exe myftp.lua machine1:/home/foo/bar machine2:/tmp/bletch

and when invoked with a single argument it works - now for remote
files only - either as an "ls -F" or as a "cat" , according to whether
the filename looks like a directory or as a file.

  lua.exe myftp.lua machine1:/home/foo/
  lua.exe myftp.lua machine1:/home/bar

I have written a handful of elisp functions for accessing remote files
using that script, but my functions are infinitely more primitive than
using tramp or ange-ftp - they create buffers with names like
"machine1:/home/foo/" or "machine1:/home/bar", in which (yuck!!!)
buffer-file-name is nil...

Hints? Pointers? Examples?...
Thanks in advance,

    Eduardo Ochs
    (format "address@hidden" "eduardoochs" "gmail" "com")

P.S.: myftp.lua and its elisp support functions are not at
<> yet, but that's just because my home machine is
broken and at work I'm behind a firewall that blocks ssh connection to
the outside world... If anyone is interested I can send them by e-mail
- but I think that they still need some cleaning...

reply via email to

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