elisp - Emacs shell-command equivalent with tramp-mode -


in emacs, can interactively:

m-x eshell <return>

cd /sudo:privileged@myserver: /path/to/mycommand 

that's pleasant , everything, i'd able in elisp code, part of function automate mundane task:

(shell-command "/sudo:privileged@myserver:/path/to/mycommand")

this doesn't quite work. apparently shell-command tries find path /sudo:privileged@myserver: , understandably complains.

is there mechanism can run arbitrary command on remote server programmatically? know that, in pinch, resort calling `(shell-command "ssh privileged@myserver /path/to/mycommand"). unfortunately, due network quirks i'm in, i'm dependent on tramp multihop proxy feature, seem simpler tramp.

i've looked @ tramp.el see how implement tramp-handle-shell-command intercepter, doesn't consider kind of case, or maybe need trick using right buffer first. options?

(i'm using gnu emacs, rather xemacs, in case matters).

use eshell-command if want run command in eshell.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -