Daniel Pittman <[EMAIL PROTECTED]> writes:

> On 08 Jan 2000, Harry Putnam <[EMAIL PROTECTED]> wrote:
> 
> [...]
> 
> > I want to use ssh scp rsync.  
> 
> Do you want to use scp(1) or rsync(1) to transfer the files? They both
> do the same thing in the end (rsync is actually no faster, as I
> understand it)

I would like to be able to use either one.  Is it really true that rync
is no faster?  My experience outside of rcp.el and emacs is that rsync
is many times faster, depending on how many files are actually moved
etc.
If I want to move an entire directory that has no counterpart on the
other machine then scp -rC is handiest. Rsync will do it too, but in
this case it would be no faster or at least not enough to matter.

Say scp -rC Mail USER@HOST:/home/reader from one machine to another
and scp overwrites any files already there I think. Where as rsync
only moves files that are not there already:
rsync -avz -e ssh Mail/ USER@HOST:/home/reader/Mail/

If I want to update files in dir already present on remote machine
then rsync would be way faster, possibly.


> What you want to set is `rcp-default-method', indicating the preferred
> method from that alist to use.

Yes, I understood the list was not to be edited but was talking about
choosing methods from it.
 
> In your case that would be `scp' to use scp(1) for transfers or `rsync'
> if you prefer to use rsync to transfer files.

So, choosing one or the other would make it the default, but the other
would be available if I specify it in the command syntax?
> 
> > Reading the comments:
> > ;; The out-of-band methods require that you can log in to the remote
> > ;; system without having to enter a password.  This is because the
> > ;; standard program "rcp" does not query for a password but just fails
> > ;; if entering a password is necessary.
> > 
> > This sounds as if I have wasted my time with rcp.el since every
> > machine I want to connect to asks for a password, and apparently scp
> > is an out-of-band method.
> 
> Yes, it is. When rcp.el connects to a remote machine, it uses ssh(1),
> rsh(1) or something like that. You can use uuencode or base64 encoding
> and transfer files directly through that connection (`inline' methods)
> or you can copy them separately (`out-of-band' methods).
> 
> Using scp(1) or rsync(1) to transfer the files is out of band (and often
> faster :)
> 
> > So assuming I've misread something or else the package would be fairly
> > useless to most people.
> 
> Nope. If you used the rsh(1)/rcp(1) combination, no password, very
> useful. If you want to use ssh(1) only, you should get passworded at
> connect time and be able to use the `inline' methods to transfer files.
> 
> Personally, the `scp' method suits me. I run the ssh-agent and that has
> my identity available to it, allowing me to authenticate to remote
> machines without a password.
> 
> So, your choices (presuming that you want ssh security) are:
>  * Use an `inline' transfer method
>  * Use an `out-of-band' transfer method and ssh-agent(1)

But according to the comment I can only use `out of band' if I don't
have to log in.  Something is screwy there.  I don't want to use any
agents at all.  I understood rcp.el would allow me to use ssh in emacs
including scp.  That comment says only if I don't have to log in with
a password, but I do, so is rcp.el useless for me then?


> > I never have used ange-ftp like that but like below:
> > /reader@HOST:/path/file  or
> > /ftp@HOST:/path/file
> > 
> > So what role does the lowercase "r" play ... What goes in METHOD?
> 
> That might actually be shown better as:
> 
>     /r[@<method>]:[<user>@]<host>:<filename>

What role does the lower case "r" play.  Is it another indication
of a METHOD?

> The method and user arguments are optional. If you don't specify a
> method then the value specified in `rcp-default-method' is used.


> > Trying the above syntax like:
> > 
> > /s@scp:reader@<HOST>:/home/reader/.emacs
> > 
> > Give me no usefull behaviour at all.  Instead I get a silly prompt
> > that askes for a password for "s@scp"
> 
> Indeed. You have not get the package installed correctly, I fear. This
> is the most stunningly nonintuitive feature of the package.
> 
> You must make *certain* that you have done `(require 'ange-ftp)'
> *before* you load `rcp.el'.
> 
> Without that the two packages will fight over who controls the paths and
> you will get the behavior that you see.
> 
> So, in your .emacs, make sure that you have `(require 'rcp)' /after/
> `(require 'ange-ftp)'. Make sure that you *do* have the require for
> ange-ftp as well...

I've done this:

Started an emacs that has *NO* require ange-ftp or require rcp code
Evaled (require 'ange-ftp)  then (require 'rcp)

Message buffer shows:

For requre ange-ftp:
ange-ftp

For require rcp:
Loading derived...
Loading derived...done
Loading advice...
Loading advice...done
rcp

Still not clear what the actual syntax is supposed to look like... so
trying:
/s@scp:reader@<HOST>:/home/reader/.emacs   gives:

ftp> open scp
ftp: scp: Unknown host
ftp> 

If I just want to read the remote .emacs with local emacs using ssh,
can I do that with rcp.el?

Trying:
/s@reader@<HOST>:/home/reader/.emacs   gives

Use C-u M-x make-directory RET RET to create directory and its parents

Trying:

/reader@<HOST>:/home/reader/.emacs

ftp> ftp> open <HOST>
ftp: connect: Connection refused

Having to do some guessing game with the syntax should be made
unnecessary by having clear and real examples available somewhere in
documentation or comments.  Seems that would be a bare minimum.

This seems to be going nowhere fast.  Why is ftp even coming into the
picture?


Reply via email to