From: mvar <mvar.40k@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: executing bash function with shell-command
Date: Mon, 22 Feb 2016 21:58:32 +0200 [thread overview]
Message-ID: <20160222195831.GA22309@mortar.AMN> (raw)
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
next reply other threads:[~2016-02-22 19:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 19:58 mvar [this message]
2016-02-23 0:27 ` executing bash function with shell-command Emanuel Berg
2016-02-23 0:34 ` Emanuel Berg
[not found] <mailman.14548.1456191752.841.help-gnu-emacs@gnu.org>
2016-02-24 21:52 ` mvar
2016-02-25 0:11 ` Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160222195831.GA22309@mortar.AMN \
--to=mvar.40k@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.