Hot answers tagged

24 votes
Accepted

How can I use my local Emacs client as the $EDITOR for remote machines I access over TRAMP?

[NOTE] this answer was heavily edited to follow the updates of with-editor developments. Most comments likely won't make much sense anymore. There are some new comments which do make sense. Magit ...
user avatar
  • 781
23 votes
Accepted

Tramp/Dired transfers files inline over ssh instead of using scp externaly

When you are saying "I am using tramp via ssh" I suppose you open a file like /ssh:host:/path/to/file. This is supposed to use always the ssh method. If you want to use the scp method, you shall use /...
user avatar
18 votes
Accepted

Tramp mode is much slower than using terminal to ssh

Turns out it was projectile that was causing the problems. As soon as I disabled projectile-mode TRAMP was buttery smooth and I began to understand the hype behind it. Hopefully this helps out ...
user avatar
  • 683
13 votes
Accepted

TRAMP over mosh

This cannot be done without some changes to mosh. Unlike ssh, mosh doesn't transmit every character that is sent by the application — it will happily skip sending data that has already scrolled off-...
user avatar
  • 5,510
12 votes
Accepted

Using Tramp for logs

auto-revert-tail-mode is great, but it has its limits. Therefore I prefer to use an asynchronous shell command. Open the remote directory in dired, position the cursor to the file you want to watch, ...
user avatar
11 votes
Accepted

Run application in cwd on remote host from within eshell

That looks like a bug in eshell, you should report it. I think you can fix it by (defadvice eshell-gather-process-output (before absolute-cmd (command args) act) (setq command (file-truename ...
user avatar
  • 4,440
11 votes
Accepted

TRAMP vs ssh to remote emacs

Since TRAMP uses ssh by default, the real question you are asking is if you should use local or remote emacs to edit remote files. Right? Is it considered better to use ... There is no better, ...
user avatar
  • 5,375
11 votes

Tramp: Waiting for prompts from remote shell

I had this exact same problem but it had nothing to do with RVM on ( which I also have ) on my Ubuntu-16.10 machine. It was related to by custom prompt (PS1) The issue was the prompt PS1. This fix :...
user avatar
  • 111
10 votes
Accepted

Tramp: killing all buffers

You can get rid of these buffers with M-x tramp-cleanup-all-connections.
user avatar
  • 5,834
10 votes

Tramp mode is much slower than using terminal to ssh

I have also found the solutions on the tramp FAQ that address speeding tramp up to work pretty well. From the page, here is what I added to my configuration: (setq remote-file-name-inhibit-cache nil)...
user avatar
10 votes

Tramp unable to open some files

I had a similar problem when trying to open/save plain ASCII files via tramp's sftp: the files were fine, I was able to edit them with, for example,nano, but trying to open them via tramp would get ...
user avatar
  • 201
9 votes
Accepted

“terminal is not fully functional” over ssh in a *shell* buffer

The "problem" is that with M-x shell (or M-x eshell btw), Emacs uses a very limited terminal emulator, so that TERM is correctly set to dumb Fancy pagers cannot operate under such limited constraints,...
user avatar
  • 4,440
9 votes

emacsclient to access remote emacs server

I think one of the things unclear from the FAQ is the necessity that both server and client be resolveable from each other. You can see this thread from 2009. Eventually, back then I did get it to ...
user avatar
  • 1,436
8 votes

TRAMP over mosh

I've asked on the mosh ML list for support, see http://thread.gmane.org/gmane.network.mosh.devel/112. The answer was "this is not going to happen any time soon".
user avatar
8 votes

How do I make tramp+eshell use my environment customized in the remote ~/.bash_profile

This question has been already answered by rekado (thanks!) (as a reply to another more general question about eshell): You can configure TRAMP to respect the PATH variable on the remote machine (...
user avatar
8 votes

How can I download a web page's source from Emacs?

Here's a really quick and dirty solution: (defun my-view-source (url) (interactive "MURL: ") (switch-to-buffer (url-retrieve url (lambda (_))))) url-retrieve is built-in to Emacs; there are also ...
user avatar
  • 4,968
8 votes
Accepted

.tramp_history files

In recent Tramp versions, there is the variable tramp-histfile-override. You can override its default value.
user avatar
8 votes
Accepted

Tramp with 2-factor authentication

You'll have to customize the tramp-password-prompt-regexp variable with the second prompt to finish the 2-factor authentication. The remote shell setup part of the manual has a simple example. This ...
user avatar
  • 5,375
8 votes

tramp and sudo: how to edit files under another account

To ssh in as you, and then run sudo su oracle, and then edit a file, do this: /ssh:you@remotehost|sudo:oracle@remotehost:/path/to/file
user avatar
8 votes

equivalent of unix "which" for exec-path?

You can attempt locating an executable in exec-path with executable-find: (executable-find "ls") ;=> "/usr/bin/ls" (executable-find "sl") ;=> nil
user avatar
  • 21k
7 votes
Accepted

Password/Key Management for multiple machines in emacs

I use a simple password manager called pass. It offers a simple command line interface with is ideal for integrating with Emacs. The backing store is a GPG encrypted GIT repo. It actually ships with ...
user avatar
  • 4,546
7 votes
Accepted

Using with-editor

As pointed out by @Nsukami and briefly summarized in my comment he linked to, this is not supported out-of-the-box yet. But by following these suggestions you should be able to get it to work. What ...
user avatar
  • 24.3k
7 votes

Can Emacs use tramp to run in an interactive session on a remote HPC node?

It sounds like you should extend tramp-methods, adding a new method which is similar to the sudo method but uses qsub -I instead. You would then be able to use a multi-hop tramp path to first connect ...
user avatar
  • 11.8k
7 votes

TRAMP vs ssh to remote emacs

I agree with Emacs User: Neither approach is objectively "better". If you don't have any obvious compelling reason to go with one or the other, then it's really just a subjective balance between ...
user avatar
  • 43.5k
7 votes

TRAMP is unbearably slow (OSX, ssh)

I know it's an old question and that you maybe don't care about the answer now but I do faced the same issue. I was pretty sure it was OS X related but in fact lags and timeouts were caused by my ...
user avatar
  • 81
7 votes

Executing remote commands with TRAMP with a single SSH connection

Emacs knows two basic commands for running external processes, call-process for synchronous processes, and start-process for asynchronous processes. For the remote case, these commands have been ...
user avatar
7 votes

cant connect with TRAMP (tramp-file-name-handler: Couldn’t find local shell prompt for /bin/sh)

Your remote prompt is not Tramp compatible. Check the Tramp documentation how to simplify it. Something like this might work: [ $TERM = "dumb" ] && PS1='$ ' If your remote shell is zsh, you ...
user avatar
6 votes
Accepted

How to store Tramp passwords permanently

Do as recommended in the Tramp manual. Write your settings into ~/.authinfo.gpg. This requires a more recent Emacs which supports auth-source.el, I guess any Emacs 24.* should do.
user avatar
6 votes
Accepted

How can I reset the prompt of my machine before using tramp without having this setting being permanent?

You could change the .bashrc such that it doesn't modify the prompt when the TERM variable is set to "dumb". if test $TERM = "dumb" # leave the prompt alone else # set up fancy prompt end ...
user avatar
  • 5,216
6 votes

Can Emacs use tramp to run in an interactive session on a remote HPC node?

I have been struggling to do the same. I found a different route that allowed me to do basically the same thing. You can open a shell buffer by M-x shell and from there connect to the login node, and ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible