Emacs Tramp connection fails with "no such directory" - emacs

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

Related

close emacs from remote computer

I forgot to close emacs at work which has buffers which are not saved.
Is there a way to close emacs from my remote computer using an ssh connection with forcing emacs to save all buffers?
You can kill the Emacs process from a shell. Emacs will have produced auto-save information for all file-related buffers.
Then start a new emacs, type M-x recover-session, and you will see a list of recent sessions to recover.
Type C-c C-c on the latest and follow instructions.

Tramp can not connect to remote server

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.

Emacs not recognising .emacs.d folder on startup

I'm new to Emacs. I recently got a dot-emacs configuration from GitHub. Cloned the repo in my home directory as .emacs.d
This is for setting up a clojure environment. When i open Emacs and enter
M-x nrepl-jack-in, the minibuf displays 'No Match'
What am I doing incorrectly? Thanks!
It's possible that nREPL isn't being loaded. Add the following to your init.el:
(autoload 'nrepl-jack-in "nrepl" nil t)
You should be able to run it now with M-x nrepl-jack-in.
If the command doesn't work you'll need to do some troubleshooting.
make sure that nREPL is actually installed. You'll need both the Emacs library and the nREPL server.
check for any errors during startup. Launch Emacs from the terminal using the --d flag:
emacs --d
You will get a backtrace if anything goes wrong during the startup.
verify that your init.el is actually being loaded. Add the following code to the end of your init.el and restart Emacs.
(message "---> LOADED")
This will show in your *Messages* buffer if everything is being loaded.
Edit:
Looks like your init.el isn't being loaded. Check your home folder for files called .emacs or .emacs.el, which might be getting loaded instead.
Otherwise it could still be a path issue. Open a terminal and make sure this is the file you expect:
less ~/.emacs.d/init.el

emacs shortcuts are not working

I've been trying to get tramp to work for Emacs and was having some problems so I upgraded my Aquamacs to the latest version. Ever since then I've had massive problems with shortcuts. C-x C-f no longer works as find-file and instead does next-buffer. If I try to remap it back to find-file in my .emacs file it still doesn't work. Though I have managed to map C-x C-o to find-file temporarily. Several other shortcuts are also broken inexplicably (with no sign of anything in my .emacs file). I've tried deleting my .emacs file completely, but it doesn't refresh back to the original shortcuts though I do know that it is reading that file because when I do make some changes ( such as C-x C-o mapped to find-file) it does reflect this. However, even when I delete the .emacs file it still keeps the color-face I chose in it.
It's also giving me problems with tramp still in that I get the following error even though I can ssh to the exact same remote host just fine when using a shell window inside of Aquamacs:
"ssh: Could not resolve hostname ssh: nodename nor servname provided, or not known. Process tramp/ssh ssh exited abnormally with code 255"
I've tried reverting to older versions of Aquamacs, deleting the application and reinstalling, but nothing seems to work. Any advice would be greatly appreciated.
Mac OS X 10.6.8, Aquamacs 2.4 Emacs 23.50.1.

Refresh remote directory in Emacs Tramp Mode

I've been using Tramp mode on my Emacs to edit files remotely. I'm also using ido mode. When I add a new file in the same directory of a file I opened using Tramp, I couldn't get Tramp to find the new file(with C-x C-f). Is there a way to refresh Tramp?
Your question is about ido-mode used with tramp. To refresh ido auto-complete while in the process of finding a file, you can press C-l, to execute: ido-reread-directory.
As documented here, you can press g in the dired buffer to run revert-buffer and refresh the directory listing.