Changes

Jump to navigation Jump to search
700 bytes added ,  06:01, 1 June 2016
"Edit the file that is associated with the current buffer as root"
(interactive)
(if let ((filep (buffer-file-name))) (progn if filep (setq find-file (concat "/sudo::" (buffer-file-name)filep)) (find-file file)) (message "Current buffer does not have an associated file."))))
</source>
 
== Debugging ==
 
=== "Waiting for prompts from remote shell" message error ===
 
This problem (as many others) is due to a fancy shell prompt of the remote host that Tramp doesn't understand.
 
Try setting a normal one
 
set PS1="> "
 
and try again.
 
You could also change the prompt regexp that Tramp understands ('''M-x customize-variable RET tramp-terminal-prompt-regexp''') but that is discouraged, or change the host prompt depending on the connection type (Tramp terminal shall be 'dumb', check the variable tramp-terminal-type):
 
<source lang="shell">
case "$TERM" in
"dumb")
PS1="> "
;;
 
esac
</source>
 
See the original [https://stackoverflow.com/questions/6954479/emacs-tramp-doesnt-work Stack Overflow answer].
[[Category:Remote Edit]]

Navigation menu