[Top][All Lists]

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

Re: Loading local .emacs from remote machine

From: gebser
Subject: Re: Loading local .emacs from remote machine
Date: Tue, 4 Feb 2003 11:35:08 -0500

I've heard about tramp and would like to try it.  I'm using emacs
v.20.7.1 and "C-h a tramp" says no matches for 'tramp'.  I searched
Redhat's site for an RPM and find none. (I've done a few tgz installs in
the past.  These of course don't get registered in the rpm database and
this sometimes comes back to bite me.)  But what the heck.  I download
the 2002-02-17 (most recent stable) version from sourceforge and examine
it for install instructions.  None there, though there's makefiles.  
They're not particularly revelatory to me, so I do another search and
find <>.

There I find and get tramp-2.0.28.tar.gz (dated 23-Dec-2002), untar it
into /usr/share/emacs/site-lisp, creating the files in a subdir of
site-lisp called tramp-2.0.28.  Then I go to
/usr/share/emacs/site-lisp/tramp-2.0.28/ and run "make EMACS=emacs all"
to create the *.elc files.  From this I get some error messages at the 
end like:

test -d ../info || mkdir ../info
makeinfo --footnote-style=end --no-split -o ../info/tramp tramp.texi
tramp.texi:66: Unknown command `copying'.
tramp.texi:88: Unmatched `@end'.
tramp.texi:143: Unknown command `insertcopying'.
makeinfo: Removing output file `../info/tramp' due to errors; use 
--force to preserve.
make[1]: *** [tramp] Error 2
make[1]: Leaving directory 
make: *** [all] Error 2

When I open the directory 
"/usr/share/emacs/site-lisp/tramp-2.0.28/texi", put the cursor on 
tramp.texi, and press "L", I get "Failed to load 1 of 1 file-- type ? 
for details ((tramp.texi)).  

Subsequently doing "M-x makeinfo-buffer" yeilds "[No match]".

But moving along...

I add:

(add-to-list 'load-path "/usr/share/emacs/site-lisp/tramp/lisp/")
(require 'tramp)

to my .emacs, create a symlink from tramp-2.0.28 to tramp, and do "C-x 
C-e" at the ends of the above two lines.  Fine.

Then I skip the next part about using the install-info command to add
the directory to the search path for Info (since the info file wasn't
created).  And that's about all there is to the install section of 

Then I skip the configuration section and just down to "Using tramp"  
just to test it out.  Doing "C-x C-f Return /userid@"  
prompts me for the password (which I successfully enter), but then hangs
for minutes (seemingly permanently) with "tramp: 'Setting shell prompt"  
in the minibuffer.  Hmmm....

I've ssh'd and scp'd to and from this site before many times, so that's 
not the deal.  The prompt on the remote system is of the form 
"userid@hostname:/path/to/file # " and maybe this has tramp baffled.  
Doing C-g finally gets me control of emacs again.

So then to help tramp recognize the shell prompt, I add this to-- and
try a few variations of it in-- ".emacs":

(add-to-list 'tramp-shell-prompt-pattern 
'("[-,0-9,A-Z,a-z]+\@[-,0-9,A-Z,a-z]+\:[-,0-9,A-Z,a-z,/]+\ \[#$]\ "))

(all on one line).  None have worked; trying to load it I get "Wrong
type argument: listp ..."

I have to say, Kai, I loved using your ange-ftp, and eventually hope to 
use tramp some day.  Maybe today isn't the day.

But, thanks,

Kai Großjohann at 07:39 (UTC+0100) on Tue, 4 Feb 2003 said:

= writes:
= > I'm using X via ssh to open emacs on a remote machine but which pops
= > open a frame on my local box.  This is extremely cool, but how can I
= > have it load my local ".emacs" file when it does?
= Try M-x load-file RET /user@host:/path/to/.emacs RET.  This logs into
= host via ftp.  Then there is Tramp which allows you to use ssh
= instead of ftp.  (Warning: I started Tramp.)
= I think what I would do is to set up a CVS repository and put my dot
= files in there, then write a Makefile that sets up symlinks from
= $HOME to the locations in the CVS repository.  (That's actually what
= I did.)  Then it becomes easy to access your dot files from anywhere,
= and also the modifications will propagate if you check in on your
= main machine and regularly update on the clients (or client's).

Happy Gui-Wei 4700

reply via email to

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