3

I am connecting regularly to servers via tramp. Sometimes everything works fine but often times my messages buffer gets spammed full of

Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘134.60.29.152’
Tramp: Opening connection for 123.630.239.152 using ssh...done

everytime I type something in a .py file. If I log into a different machine (same setup Ubuntu 18.04) it does not occur. I use build in tramp and did not specify anything with respect to tramp. If I open on the remote machine e.g. .bashrc this problem does not happen. does anyone know what the problem is?

thanks in advance

CD86
  • 543
  • 2
  • 9
  • Is there a problem? Other than lots of messages appearing in your Messages buffer, does everything else work properly? If so, maybe there's something unusual about the network connection to that particular host; if all it does is generate noise in your Messages buffer, you could just ignore it – Tyler Mar 14 '19 at 17:11
  • it renders the typing extremely slow and laggy. also, I should have mentioned, that it spams the minibuffer, so it is very annoying – CD86 Mar 14 '19 at 17:14
  • that's definitely a real problem then! Is the bash prompt on the problem machine different than the other computers you connect to? I've had problems when the prompt of the target machine doesn't match the regexp Tramp uses to identify the prompts. – Tyler Mar 14 '19 at 17:20
  • I use the very same .bashrc on every of those servers that I connect to that I use on my main machine -.- – CD86 Mar 14 '19 at 17:41
  • Have you tried loading emacs without your local config, `emacs -Q`? If the problem persists, then I'd suspect something in the way the problem server is configured (maybe something in ssh?). If the problem goes away with `emacs -Q`, something in your Emacs config is causing the problem. – Tyler Mar 14 '19 at 17:45
  • 1
    I would hazard a guess that you are using `flymake` or `flycheck` with python, and that you are accessing your python files via tramp, and the flymake/check process is being invoked every few seconds or similar and starting up a new process on the remote server over tramp, and that is what is generating the connection messages. If that's correct, obviously it's not usable for you in this scenario, so either disable flymake/check, or find a better way to work with the remote files (e.g. with an emacs which is local to the files). – phils Mar 14 '19 at 19:47
  • thank you for your ideas. but isnt the way of locally installing emacs on the remote contradictory to the whole idea of conveniently using tramp in the first place – CD86 Mar 15 '19 at 09:52

1 Answers1

1

This error seems very similar to an issue I am seeing[0]. Do you use VC? Are the (remote) files backed by some version control system? I notice using the following options with TRAMP cause a number of issues similar to what you describe:

(setq-default auto-revert-check-vc-info t)
(setq-default auto-revert-remote-files t)

I have since set these values to nil. I have also set tramp-verbose to 1, instead of the default of 3.

(setq-default tramp-verbose 1)
(setq-default auto-revert-check-vc-info nil)
(setq-default auto-revert-remote-files nil)

You can check what is causing the messages by running M-x debug-on-entry RET message RET while connected to the remote files, and see what function in Emacs, whether it's flycheck/flymake` or, like in my case, VC.

Since it's VC for me and it's for a repository I don't care to ever interact with, I use the following to disable SVN:

(setq-default vc-handled-backends '(Git))

But this may be a little too aggressive or undesired.

I don't have a better solution than perhaps disabling certain features when connected to remote files or increasing some of the refresh timers.

kballou
  • 123
  • 1
  • 1
  • 9