Tramp can not connect to remote server - emacs

I have upgraded my emacs and updated some el-get packages including tramp (my system is a bit old, and I could not upgrade some emacs packages), and now I can not use tramp to connect to a remote server:
Tramp: Opening connection for server1 using ssh...failed
byte-code: Host `server1' looks like a remote host, `ssh' can only use the local host
I am using tramp version 2.2.13-pre and emacs version 24.5.1. I have compiled emacs myself, in case it matters.
What can be going wrong? What could I try?
EDIT
I am calling tramp like this:
C-x C-f /user#server1:filename

Call emacs -Q. Likely, Tramp will work then. In this case, bisect your .emacs file and restart Emacs, until you find the package which causes the trouble.
One package which didn't cooperate well with Tramp was projectile. Disable it, when you are using it.

Related

Clojure Emacs Connecting to Remote REPL

When using plain repl with tramp I can navigate to a remote directory and exetute inferior-lisp and it launches a inferior-lisp process on the remote. With nrepl I can start the repl on the remote machine using lein repl than connect to it using nrepl-jack-in but the problem is with nrepl I have to setup firewall rules or use ssh and forward ports so I can jack in. With inferior-lisp and tramp method I do not need to do anything special just hit M-x inferior-lisp and I am set. Is there a way to achieve similar behaviour using nrepl and tramp?
Depending on your settings, most likely inferior-lisp invokes a local process.
If you just want to work on your Clojure project locally, I would recommend to download the project folder from the remote machine and repl locally using nrepl-jack-in.

Emacs Tramp connection fails with "no such directory"

I'm hoping to use Tramp mode to edit files on a remote Linux machine, so I open a file like this:
C-x C-f /ssh:hwolff#<host>:/home/hwolff/temp.txt
But there is no prompt for a password, and saving the file brings the error "no such directory". Emacs seems to be treating the file path as if it's local, rather than attempting to connect to the remote machine. I can SSH to that machine with no problems.
Following the SO discussion Emacs Tramp unable to open directory at times, I tried turning on tramp-debug-buffer, but no debug buffer ever appeared.
Relevant lines from the *Messages* buffer:
Use M-x make-directory RET RET to create the directory and its parents
...
Saving file /ssh:hwolff#<host>:/home/hwolff/temp.txt...
ad-Orig-error: /ssh:hwolff#<host>:/home/hwolff/: no such directory
I loaded Tramp like this:
(load-file "/Applications/Aquamacs.app/Contents/Resources/lisp/net/tramp.elc")
That seemed to work fine, and Emacs seems to report that Tramp is ready:
M-x tramp-version
2.1.10
I'm running Emacs 23.3.1 as Aquamacs on Mac OS 10.7.5:
GNU Emacs 23.3.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
of 2011-03-18 on braeburn.aquamacs.org - Aquamacs Distribution 2.2

How to teach emacs remote compilation?

I use sshfs + emacs to remotely work on a project.
But I can't "M-X compile, make" since make is remote.
What is the easiest way to solve it so that emacs can take me to the first error?
(I have only ssh access to the machine)
TRAMP seems to be an overkill.
No, I don't want to give up having emacs locally.
Have you tried something like M-x compile RET ssh remotehost cd project/dir\; make RET

How can I use ssh with Emacs on Windows

I have a Windows developer workstation with Emacs installed and Linux server with source files and SSH server. How can I open source files on Emacs?
I have tryied:
C-x C-f /ssh:user#host#22:/home/user/file.rb
but got unreadable error message.
I think you need TRAMP for Emacs:
After the installation of tramp into your Emacs, you will be able to
access files on remote machines as though they were local. Access to
the remote file system for editing files, version control, and dired
are transparently enabled.
The package provides support for ssh connections out of the box, one
of the more common uses of the package. This allows relatively secure
access to machines, especially if ftp access is disabled.
Under Windows, tramp is integrated with the PuTTY package, using the
plink program.
For more info:
http://www.gnu.org/s/tramp/#Overview
PS: Copying and pasting the "unreadable error message" would certainly be useful.

Emacs desktop doesn't remember TRAMP connections?

I use emacs to edit scripts and code files on several different servers. TRAMP is working very well. However, when I exit emacs, all my tramp connections go away. I tried desktop-save-mode, but only local files show up when I restart emacs. Is there some package that will remember tramp connections? Is this just a configuration issue?
You can customize the variable desktop-buffers-not-to-save to do this:
(setq desktop-buffers-not-to-save "^$")
By default it is set to a regexp that matches TRAMP filenames. I would have expected setting it to nil would have worked, but, alas, it does not.