recently, some strange behaviour popped up when editing c/c++ files in emacs: Whenever I want to write a comment, the first / I enter will open a buffer of type *tramp/spc C* with error message

ssh: could not resolve hostname c: Name or service not known

My research has brought me as far as finding out that this is related to tramp-mode, something I never used or even knew that it exists. So, my question is: How can I get rid of this behaviour?

Using emacs24, installed from the Ubuntu 16.04 repos, if that matters.

Thanks for any advice.

EDIT 16/12/16

this most have something to do with my .emacs as the buffer is not popping up when starting with emacs -q.

Active modes in my editing buffer are

Abbrev Auto-Complete Auto-Composition Auto-Compression Auto-Encryption Blink-Cursor Electric-Indent File-Name-Shadow Font-Lock Global-Auto-Complete Global-Font-Lock Line-Number Menu-Bar Mouse-Wheel Tool-Bar Tooltip Transient-Mark

  • Maybe you get some insight with describe-mode (C-h m), which gives you a list of enabled minor modes for the buffer. Or at least add this list of modes to your question so others can help. – Juancho Dec 13 '16 at 13:21
  • Does this happen if you run a clean emacs (with emacs -q)? – Juancho Dec 13 '16 at 13:22
  • No, it does not happen with emacs -q - edited the original question to contain the output of describe-mode. – refused82 Dec 16 '16 at 11:08

See this: https://stackoverflow.com/questions/778716/how-can-i-make-emacs-start-up-faster for similar problem(s), you need to solve for hostname, by editing /etc/hostname, and /etc/hostsfile. (see the answer of tsar2512).

Another solution (worked for me, on my mac): edit ~/.ssh/config file, replace everything you find out there with the following:

Host *
ControlPath ~/.ssh/master-%r@%h:%p
ControlMaster auto

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.