3

I'm trying to troubleshoot why an emacs+tramp connection that used to work doesn't now. At first I thought it might be an Aquamacs problem, but I loaded Emacs.app on OSX, based on version 23.3 (9.0), and it doesn't work either. The remote host runs FreeBSD 7.4 and the user shell defaults to /usr/local/bin/bash.

If I try to open a file such as:

Find file: /username@remote_host:~/folder/

...the cursor in the minibuffer stops at:

Find file: /username@remote_host

...and I can't type anything further. Confounding this, I can't C-g to stop it, either. Emacs just locks up. It times out after a minute or so, but until then is unusable.

The relevant lines of my .emacs file are:

(require 'tramp)
(setq tramp-debug-buffer t)
(setq tramp-verbose 9)
(setq tramp-default-method "ssh")
(setq tramp-password-prompt-regexp ".*[Pp]assword: *$")
(setq tramp-shell-prompt-pattern "^[^;$#>]*[;$#>] *")
(setq password-cache-expiry nil)

And the password and shell prompts on the machine in question (anonymized) look like:

Password:

[username@remote_host ~]$   # with a single space at the end

The value of tramp-password-prompt-regexp is ".*[Pp]assword: *$"

The value of tramp-shell-prompt-pattern is "^[^;$#>]*[;$#>] *"

And lastly, the last few lines of the debug buffer:

14:36:40.271851 tramp-get-connection-property (7) # check-remote-echo nil
14:36:41.090876 tramp-wait-for-regexp (6) # 
are you awake
#$ 
14:36:41.091037 tramp-wait-for-regexp (1) # File error: [[Regexp `\(^\|\)[^#$
?$' not found in 60 secs]]

I'm not sure where the different version of the shell regexp are coming from, but in any case, I'm never even getting to the password prompt.

Any ideas what I might be doing wrong?

Addendum

Using GNU Emacs 22.1.1 (mac-apple-darwin, Carbon Version 1.6.0), Tramp version 2.0.55, works. I'm reluctant to rely on that, however, as it is based on the terminal window and I've shuffled Cmd, Ctrl, and Caps Lock around to make my workstation feel more like my home machine, then told Emacs to treat the Cmd key as an alternate Ctrl; unfortunately, the terminal window traps several Cmd-key combinations.

Furthermore

Downloaded the Emacs-22.3-i386-10.5.7.dmg from Emacs For OS X, which uses tramp 2.0.58-pre. That works too, and has fewer issues with the environment trapping key combinations. But I still don't understand why the Aquamacs and later Carbon Emacs versions quit working.

Drew
  • 29,895
  • 7
  • 74
  • 104
amp108
  • 432
  • 3
  • 14
  • Does it help if you add an `ssh:` prefix, i.e. `/ssh:username@remote_host:path` – tripleee Jul 14 '12 at 18:53
  • That's how I'd done it in the first place. I just updated to 24.1, and it seems to work, based on the 15 minutes I've spent tooling around with it. – amp108 Jul 18 '12 at 23:04
  • Had you upgraded Aquamacs or any of the elisp libs? Do you notice alot more network latency? The hanging problem is do to emacs doing some network operations (opening sockets at a low level). Many of these ops are not interruptible and you have to wait for a particular timeout. I experience this from time to time when my local network is bogged down and there is increased latency. – dietbuddha Sep 13 '13 at 04:01
  • have you noticed that your regex is `"^[^;$#>]*[;$#>] *"`? Shouldn't be without the last blank like `"^[^;$#>]*[;$#>]*"`? – Federico Piazza Apr 08 '15 at 21:04
  • @Fede: Nope, I meant it to be one of those four characters, followed by zero or more spaces. – amp108 Apr 15 '15 at 00:18

0 Answers0