[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
executing bash function with shell-command
From: |
mvar |
Subject: |
executing bash function with shell-command |
Date: |
Mon, 22 Feb 2016 21:58:32 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello,
Apologies if this has been asked before, i couldn't find something relevant
in the archives!
I've been trying to setup a lisp function in emacs (24.5.1) that executes
an external bash function defined in my .bashrc file (or even .emacs_bash).
If i open the shell directly from within emacs and type the function in there
it works, but if i call it with "shell-command" i get a "command not found"
error.
A workaround is to run shell-command with "source ~/.emacs-bash &&
function_name".
Am i doing something horribly wrong?
another question, is it viable to create some function/script in Lisp
that for example will ssh to a remote machine, execute some pre-defined
commands and log-off ? The only relevant info i've found so far is for
remote editing with tramp.
thanks,
Michael
- executing bash function with shell-command,
mvar <=