From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mvar Newsgroups: gmane.emacs.help Subject: executing bash function with shell-command Date: Mon, 22 Feb 2016 21:58:32 +0200 Message-ID: <20160222195831.GA22309@mortar.AMN> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1456174213 14726 80.91.229.3 (22 Feb 2016 20:50:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2016 20:50:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 22 21:50:12 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aXxQm-0002Xu-9p for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Feb 2016 21:50:08 +0100 Original-Received: from localhost ([::1]:51867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXxQl-0003o1-Px for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Feb 2016 15:50:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXwcv-0003Uj-AH for help-gnu-emacs@gnu.org; Mon, 22 Feb 2016 14:58:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXwcu-0002F6-E3 for help-gnu-emacs@gnu.org; Mon, 22 Feb 2016 14:58:37 -0500 Original-Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:38687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXwcu-0002F0-6e for help-gnu-emacs@gnu.org; Mon, 22 Feb 2016 14:58:36 -0500 Original-Received: by mail-wm0-x231.google.com with SMTP id a4so179125325wme.1 for ; Mon, 22 Feb 2016 11:58:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:message-id:mime-version:content-disposition :user-agent; bh=S2pIY5ouj/sUIFN1XfTm4F3ljWo+HoCKiq356tjS8lg=; b=z+pME6obJuAbKuPREtYa92OfGfpuk2VFU5FwbDFS6ipYwAmOfXlTg1N22CZHGfGwc9 gmsu5Z3Do0PGszk+M6Z9pE8/gBwVJzUNHTwKO43HkM8Y/Vvf9VnI8dHsJc8zJk4MDNCK PYf7fxuSq2kJpm0AN9YDD/dp6Ikre0kbLek7RK7sY2cCkaQAdxoNoOi21OA7+aQIoTUQ 0+slyHAbamr8LRXqU/ksn1z0JMsGn8RxsIloPTTkLDgC5QH+TFnoDG2RreXdYJsz/Ska Ix6RADACDyoqbeGd3dpANjbYOsim63cZOoWS+p3DFgR8S10nIA5Lbhuw6Xnyk8qxzFJ5 zdmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:mime-version :content-disposition:user-agent; bh=S2pIY5ouj/sUIFN1XfTm4F3ljWo+HoCKiq356tjS8lg=; b=c7YubBvFjkg0wxSt2Nzp5vh0P4jDepbB8S2oJT8FVLWq8hU7Y/+7eAfM+yAj/y4V0W KKRdk83RWDbqYeiNJRiX9szSUOV9Qcrg2CIdS5FrmejZO/DsAnEw+eA0esoE1j9Mgv3B yLIcvLvoUoti01lfDHwKVJFoyG9Uv1TKJ32q0LuJhe+Wq8eS1H6WyqORp0jTjtTZbe6g FVMcnciIGzxEI7T/KOo21Qfe8UTWloRZYe3hDuX9RG4mMvS95xyGB5lLgN6zm7F9wuNs eYB0eN7WjUksnkgzH8AnJA7b7ji3nEnCcWQC45+l2lByFOwksG3kc4sZfzeYUQA5dGvw a6oQ== X-Gm-Message-State: AG10YORwTJLUd5Gkzl3PHSpVEG3N4fzqPDHNelfoKEhgN/5co5O48tJ/8gWoaiA7gsPf3w== X-Received: by 10.28.91.83 with SMTP id p80mr15283966wmb.48.1456171115525; Mon, 22 Feb 2016 11:58:35 -0800 (PST) Original-Received: from mortar.AMN (ip-2a02-2149-867a-8200-6e62-6dff-fe56-626f.ip6.forthnet.gr. [2a02:2149:867a:8200:6e62:6dff:fe56:626f]) by smtp.gmail.com with ESMTPSA id 198sm22721775wml.22.2016.02.22.11.58.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 11:58:35 -0800 (PST) X-Google-Original-From: mvar Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::231 X-Mailman-Approved-At: Mon, 22 Feb 2016 15:49:35 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109251 Archived-At: 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