help-gnu-emacs
[Top][All Lists]
Advanced

[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 16:51:59 -0500 (EST)

Kai,

Thanks for the feedback.

I looked around and it seems I'd have to upgrade to RH 8.0 to be able to use
texinfo 4.2; it would require upgrading some other more central system files.
I'd like to have the info files, but today isn't the day for me to do a full
upgrade.  But maybe we can still get tramp working.  (See below.)

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

= gebser@ameritech.net writes:
= 
= >...
= > ...
= 
= Tramp requires Texinfo 4.2 to build the info files, 4.1 is too old.
= The new command `copying' makes sure that the copying information
= comes out in all formats of the document (previous Texinfo documents
= missed the copying information in the HTML format).
= 
= I didn't try to fix it because it was a somewhat political decision
= to use the new Texinfo version.  (Maybe I would have refrained from
= the command had I known what it entails...  Maybe I should make some
= backward compatibility hack.)

This would help out those of us who don't upgrade with each new version 
that comes out.  I know a lot of people still on rh 7.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)).  
= 
= `L' is for Lisp files (*.el), not Texinfo files (*.texi).

I was following the documentation.  What would be the way to load a 
*.texi file?

= 
= > Subsequently doing "M-x makeinfo-buffer" yeilds "[No match]".
= 
= I think it's M-x texinfo-format-buffer RET...

Again, the command I used was directly from the docs.


= 
= > But moving along...
= 
= Wow, very persevering.

People say that....  Well, they don't give me a "Wow", but yeah.  :)


= ...
= 
= It would be nice to have proper build scripts, but given that Tramp is
= included in both Emacs and XEmacs, my motivation for making proper
= build scripts was so-so.  And also, it's enough to frob load-path,
= basically.
= 
= > 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 
= > <http://www.nongnu.org/tramp/>.  

This is where I was reading the aforementioned docs. 


= >
= > Then I skip the configuration section and just down to "Using tramp"  
= > just to test it out.  Doing "C-x C-f Return /userid@1.2.3.4:/etc/foo"  
= > 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.
= 
= Yes, I also guess that the shell prompt wasn't recognized.  Lessee
= now, what is the default value of tramp-shell-prompt-pattern?  Hm.
= It should have matched this prompt.
= 
= So I'm somewhat confused.

I don't know enough about this even to be confused....  8\


= 
= Could you put (setq tramp-verbose 10) and (setq tramp-debug-buffer t)
= in ~/.emacs and try again and show me the *tramp/foo* buffer in
= addition to the *debug tramp/foo* buffer?
= 
= Also, it would be good to do M-x toggle-debug-on-quit RET before
= trying, then C-g will give you a backtrace.  Please send it, too.
= 
= Oh, and removing tramp.elc before starting Emacs will give a prettier
= backtrace.

Did all this.  Then tried to open a file on the same machine as before.

The output of *Backtrace*:

===============================================================
Signaling: (quit)
  accept-process-output(#<process *tramp/nil ken@fencefarm*> 1)
  tramp-wait-for-output()
  tramp-open-connection-setup-interactive-shell(#<process *tramp/nil 
ken@fencefarm*> nil nil "ken" "fencefarm")
  tramp-open-connection-rsh(nil nil "ken" "fencefarm")
  tramp-maybe-open-connection(nil nil "ken" "fencefarm")
  tramp-send-command(nil nil "ken" "fencefarm" "( test -d /etc/hosts 
2>/dev/null; echo tramp_exit_status $? )")
  tramp-send-command-and-check(nil nil "ken" "fencefarm" "test -d 
/etc/hosts" t)
  tramp-handle-file-directory-p("/ken@fencefarm:/etc/hosts")
  apply(tramp-handle-file-directory-p "/ken@fencefarm:/etc/hosts")
  tramp-file-name-handler(file-directory-p "/ken@fencefarm:/etc/hosts")
  file-directory-p("/ken@fencefarm:/etc/hosts")
  find-file-noselect("/ken@fencefarm:/etc/hosts" nil nil 1)
  find-file("/ken@fencefarm:/etc/hosts" 1)
* call-interactively(find-file)
============================================================


Here's *tramp/nil ken@fencefarm*:

============================================================

> > 
///»¢ò ;Öv­     éüž­
Read from remote host fencefarm: Connection reset by peer
Connection to fencefarm closed.

Process *tramp/nil root@fencefarm* exited abnormally with code 255

============================================================


And here's *debug tramp/nil ken@fencefarm*

============================================================

# Opening connection for ken@fencefarm using nil...
# Waiting for prompts from remote shell
# Waiting 60s for prompt from remote shell
# Looking for regexp "^.*\([pP]assword\|passphrase.*\):
# Looking for regexp ".*ogin: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^.*\(Connection \(closed\|refused\)\|Host key 
verification failed\.\|Login \(Incorrect\|incorrect\)\|Name or service not 
known\|Permission denied\.\|Sorry, try again\.\).*\|^.*\(Received signal 
[0-9]+\).*" from remote shell
# Looking for regexp "\(Are you sure you want to continue connecting 
(yes/no)\?\)\s-*" from remote shell
# Looking for regexp "\(Store key in cache\? (y/n)\)\s-*" from remote shell
# Looking for regexp "\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*" from remote 
shell
# Looking for regexp "^.*\([pP]assword\|passphrase.*\):
# Sending password
# Looking for regexp ".*ogin: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^.*\(Connection \(closed\|refused\)\|Host key 
verification failed\.\|Login \(Incorrect\|incorrect\)\|Name or service not 
known\|Permission denied\.\|Sorry, try again\.\).*\|^.*\(Received signal 
[0-9]+\).*" from remote shell
# Looking for regexp "\(Are you sure you want to continue connecting 
(yes/no)\?\)\s-*" from remote shell
# Looking for regexp "\(Store key in cache\? (y/n)\)\s-*" from remote shell
# Looking for regexp "\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*" from remote 
shell
# Looking for regexp "^.*\([pP]assword\|passphrase.*\):
# Looking for regexp ".*ogin: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^.*\(Connection \(closed\|refused\)\|Host key 
verification failed\.\|Login \(Incorrect\|incorrect\)\|Name or service not 
known\|Permission denied\.\|Sorry, try again\.\).*\|^.*\(Received signal 
[0-9]+\).*" from remote shell
# Looking for regexp "\(Are you sure you want to continue connecting 
(yes/no)\?\)\s-*" from remote shell
# Looking for regexp "\(Store key in cache\? (y/n)\)\s-*" from remote shell
# Looking for regexp "\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*" from remote 
shell
# Looking for regexp "^.*\([pP]assword\|passphrase.*\):
# Looking for regexp ".*ogin: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Looking for regexp "^.*\(Connection \(closed\|refused\)\|Host key 
verification failed\.\|Login \(Incorrect\|incorrect\)\|Name or service not 
known\|Permission denied\.\|Sorry, try again\.\).*\|^.*\(Received signal 
[0-9]+\).*" from remote shell
# Looking for regexp "\(Are you sure you want to continue connecting 
(yes/no)\?\)\s-*" from remote shell
# Looking for regexp "\(Store key in cache\? (y/n)\)\s-*" from remote shell
# Looking for regexp "\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*" from remote 
shell
# Looking for regexp "^.*\([pP]assword\|passphrase.*\):
# Looking for regexp ".*ogin: *" from remote shell
# Looking for regexp "^[^#$%>
]*[#$%>] *" from remote shell
# Found remote shell prompt.
# Initializing remote shell
$ exec env PS1='$ ' /bin/sh
# Waiting 30s for remote `/bin/sh' to come up...
exec env 'PS1=$ ' /bin/sh
$ # Setting up remote shell environment
stty -inlcr -echo kill '^U'
$ $ # Determining coding system
foo
bar
$ # Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1'
$ # Waiting 30s for `set +o vi +o emacs'
$ # Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
$ # Waiting 30s for `unset CDPATH'
$ # Setting shell prompt
$ PS1='
///»¢ò ;YÖv­   éüž­
'; PS2=''; PS3=''
 
============================================================

Here's what as ssh login from the command prompt looks like:

================================================================
$ ssh ken@fencefarm
ken@fencefarm's password: 
Last login: Tue Feb  4 16:20:15 2003 from adsl-65-43-213-[...]
================================================================


= > ...
= > '("[-,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 ..."
= 
= The regexp syntax is weird.  For instance, [a-z,A-Z] matches
= lowercase letters and uppercase letters and the comma...
= 
= But the main problem is that tramp-shell-prompt-pattern is not
= supposed to be a list.  It's supposed to be a string.

A string in elisp must be some really strange thing.

(add-to-list 'tramp-shell-prompt-pattern "abc")

also gives the same error.  It seems that everything and anything I put into
the third arg is a listp.  It's a shame elisp is so obtuse.  I'd like to learn
it so's to do some helpful work on emacs.  Several times I've tried to do
simple things in elisp, following books and tutorials, but never had any
progress with it.  Maybe I need to be dyslexic.  :)

= 
= ...


Thanks again for the assistance.
ken

-- 
Happy Gui-Wei 4700






reply via email to

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