From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mvar Newsgroups: gmane.emacs.help Subject: Re: executing bash function with shell-command Date: Wed, 24 Feb 2016 23:52:02 +0200 Message-ID: <20160224215202.GA3410@mortar.AMN> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1456350740 4165 80.91.229.3 (24 Feb 2016 21:52:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Feb 2016 21:52:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 24 22:52:19 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 1aYhM3-0005D9-CC for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 22:52:19 +0100 Original-Received: from localhost ([::1]:38659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYhM2-0004Wp-W6 for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Feb 2016 16:52:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYhLs-0004Wj-L5 for help-gnu-emacs@gnu.org; Wed, 24 Feb 2016 16:52:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYhLr-0000IL-J6 for help-gnu-emacs@gnu.org; Wed, 24 Feb 2016 16:52:08 -0500 Original-Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:37071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYhLr-0000HC-By for help-gnu-emacs@gnu.org; Wed, 24 Feb 2016 16:52:07 -0500 Original-Received: by mail-wm0-x22b.google.com with SMTP id g62so2190777wme.0 for ; Wed, 24 Feb 2016 13:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Zyh1q0TCCqLG9drUhnkn5LpjQ/YsLyiHT9nzQvfPzBg=; b=tj2ozm445FJNVdKPcdMKz53BuzWsJB7wPk7PmUKwWu/LysUx6F47AFmBlgaEhI3Gcl RXLl45G8DvG3kh6K4zRRlFi1vbK9GxI82dJEf2ip/mgUFmPXvs0IXfd30oa30EBRAmq0 XlWiezfyfCCnMXLKvUgH7XB+E60mh2Kdsso/C5L+qVBHQvHPIWvgko4EkxfnhbvXsath xPENp1748/O/8o8sIhAPi0LLkFj4oo7jzdyRZrBXYx4LwfDuN2vvn5LPjbvDYUjV/EZR YVyL1SIOQI3zhJxXrXIC6Lf8BMVI5qZxGWVm/0TtSk9gRqatpQoD1KzkYj31Wnj00FrE 7EvA== 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:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=Zyh1q0TCCqLG9drUhnkn5LpjQ/YsLyiHT9nzQvfPzBg=; b=YSp69k7nHKMcyRJbnxxaMDjc0kw3Ewz+IBaPnMEXey176AK3BNDi2w7E8+IiYebda3 R2i2A+evMlaehwg06esEp0g5Q9c3kc/kMn2tEXGvJh/YI/buCjFueIsnCxqRUjgAwd18 ERAVJF31iKgwSJd02Sv4Ds8CBcoe/cXIoLfOTc3HIg7pPKdhnsfc0v/03QiSTDf5hleW uf1mc/TGgxGujHOFltQ4NiXH8ddqi0kVCOssKgvgQ1PA5fOTP900IS5mmHC1SVq2az3L 0rtrtHHbUUhEPFjs5FD4isG8MSCxmiwlHQ4PcmHCGMMEmB0FC4uY4eUn2Rax1duaRjlJ Uv5g== X-Gm-Message-State: AG10YOTr/h40g9vGyEor8PLaafOmsKuVPi5rTKqyE96uEg0PKbCkREPG1QUOx7KKQ6QIvQ== X-Received: by 10.28.221.136 with SMTP id u130mr145521wmg.40.1456350726335; Wed, 24 Feb 2016 13:52:06 -0800 (PST) Original-Received: from mortar.AMN (ip-2a02-2149-8174-5000-6e62-6dff-fe56-626f.ip6.forthnet.gr. [2a02:2149:8174:5000:6e62:6dff:fe56:626f]) by smtp.gmail.com with ESMTPSA id ka7sm4884667wjb.8.2016.02.24.13.52.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Feb 2016 13:52:05 -0800 (PST) X-Google-Original-From: mvar Content-Disposition: inline In-Reply-To: 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::22b 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:109299 Archived-At: > Emanuel Berg writes: > > Yes, this works for me even tho I'm on zsh. > > In ~/.bashrc put this, carefully, as bash is fussy! > > function hi () { > echo hello > } > > Then invoke Emacs like this: > > SHELL=/bin/bash BASH_ENV=~/.bashrc emacs -Q > > Then: > > M-x shell-command RET hi RET > > N.B. Don't rely on SHELL if you want to change the > shell in general. > > -- > underground experts united > http://user.it.uu.se/~embe8573 hello Emanuel, yes this works perfectly fine and even with --daemon! many thanks! Michael