tramp

Emacs: Tramp doesn't work

荒凉一梦 提交于 2019-11-26 10:28:08
问题 I tried to open a remote file via Emacs via Tramp. (require \'tramp) (setq tramp-default-method \"ssh\") I get a message from Emacs Tramp: Waiting for prompts from remote shell Emacs hung and did not respond to any action after that Emacs was installed on Windows; the remote file was on a Linux machine. 回答1: If the account you're connecting to uses some weird fancy shell prompt, then there is a good chance that this is what makes tramp trip. Log in as root, then enter PS1="> " (that's a

Open file via SSH and Sudo with Emacs

冷暖自知 提交于 2019-11-26 06:54:45
问题 I want to open a file inside Emacs which is located on a remote server, with sudo powers on the server. I can open local files with sudo via Tramp like this: C-x C-f /sudo::/home/user/file But I want to use sudo on the server: C-x C-f /sudo::user@server/home/user/file But this gives me sudo powers on my local machine, it asks for my sudo password on the local machine. Is there a way to use sudo on the server? BTW: Emacs is not installed on the server 回答1: As of Emacs 24.3, an analog of the