user3482407 user3482407 - 1 year ago 105
Bash Question

Emacs custom shell commands

Is there a possability in Emacs to run custom commands or a set of commands (eg. shell) with a user defined emacs shortcut/hook?
To make this clearer. I am working with an embedded system (target), but developing on the host. After writing and compiling code (eg using emacs compile command), I would like to copy (eg. scp) the binary to the system right away.
Furthermore it would be good if the custom shorcut/hook would be easy to adjust (eg. ip address of the target).

Btw: I am aware of the "shell-command" in emacs, but that is not quite what I am looking for.

Would appreciate any advice. Thanks!

Answer Source

I ended up using C-x C-f /root@my-target-ip:/tmp/myfile to edit the file directly on the target. Then you can run it with shell-command ./myfile from within emacs.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download