From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: Executing bash bash script from emacs / elisp Date: Fri, 3 Sep 2010 13:09:35 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1283512289 11046 80.91.229.12 (3 Sep 2010 11:11:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Sep 2010 11:11:29 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Rainer M Krug Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 03 13:11:28 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OrUAk-0007tN-MX for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Sep 2010 13:11:26 +0200 Original-Received: from localhost ([127.0.0.1]:45816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrUAf-0001p2-2G for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Sep 2010 07:11:01 -0400 Original-Received: from [140.186.70.92] (port=51560 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrUAB-0001oq-AH for help-gnu-emacs@gnu.org; Fri, 03 Sep 2010 07:10:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrU9n-0006M3-Sl for help-gnu-emacs@gnu.org; Fri, 03 Sep 2010 07:10:08 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:39600) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrU9n-0006Ls-Qd for help-gnu-emacs@gnu.org; Fri, 03 Sep 2010 07:10:07 -0400 Original-Received: by vws16 with SMTP id 16so1704562vws.0 for ; Fri, 03 Sep 2010 04:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=eFYY//CxIWm9OZbyi2gqYN7wJQITU4fETbTEzcbsi4s=; b=wRXYqgWY2IkNl0rReU9CLMG15aK3PVr810v504fe+zZJj9xDH5m+BixeF2vwyOzHDm EstBPbwy0oHrp2olMbYNUDmhktCk9+U8S9Gf2KCA2jhaux2J61NBRJY+5GJa+DH3Jb8G t15QL5FLZ8RvHuKImzgGZFmMGBSaqLwkfk4uo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=FMsLY5bz4sKuFHgTKUze++vg6Ax7Ywq/DuyjFw9pX9GNPB0vHJAhkixRrjNP6V3Qgq 1rAGz1hLtMaCTUouC3+gcqxlFGDBa+Gmzo/GBThYiIZTiyA682m5vWml21EYXqgmxeN7 9I91iIkKyidDbKKseU3U8qkblfeL5raI/a4hU= Original-Received: by 10.220.121.202 with SMTP id i10mr483527vcr.87.1283512206523; Fri, 03 Sep 2010 04:10:06 -0700 (PDT) Original-Received: by 10.220.200.195 with HTTP; Fri, 3 Sep 2010 04:09:35 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74858 Archived-At: 2010/9/3 Rainer M Krug : > Hi > I am a complete beginner concerning elisp - so please bear with me if > this is a simple question. > > I would like to execute a shell (bash) script from elisp, which is then > called from org-babel to do some post-processing of the result of > tangling. Tangling in org-babel has a hook for post-processing, and I > know how to set it. Therefore I am simply looking for a way of executing > my shell script from that hook. > > essentially: > > this-function-executes-a-shell-script(The_Shell_Script.sh) > > Thanks, > Rainer > > > You want to look at the functions `call-process-shell-command' and `call-process'. Example: (call-process-shell-command "the_shell_script.sh" nil nil nil "arg1" "arg2") That's equivalent to running "the_shell_script.sh arg1 arg" in a shell. -- Deniz Dogan