From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] shell does not unquote Date: Sun, 09 Feb 2014 20:18:19 -0700 Message-ID: <87wqh364g4.fsf@gmail.com> References: <87bnylcaje.fsf@gmail.com> <87ob2kc4fa.fsf@gmail.com> <87iosrbr1m.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WChQC-0004Iv-6d for emacs-orgmode@gnu.org; Sun, 09 Feb 2014 22:20:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WChQ6-0003DF-PU for emacs-orgmode@gnu.org; Sun, 09 Feb 2014 22:20:36 -0500 Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]:49829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WChQ6-0003CB-DZ for emacs-orgmode@gnu.org; Sun, 09 Feb 2014 22:20:30 -0500 Received: by mail-pb0-f46.google.com with SMTP id um1so5642500pbc.19 for ; Sun, 09 Feb 2014 19:20:29 -0800 (PST) In-Reply-To: (Samuel Wales's message of "Sat, 8 Feb 2014 18:39:19 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org, Eric Schulte Samuel Wales writes: > hi eric, > > the object is to make the code inside a babel shell block as similar > to a real shell script as possible. also, calling it using #+call > should be like calling it from another shell script. > > this isn't possible in babel at present. > > the script cannot use "$@" for its positional parameters. it could > use <>, but that requires the creation of an extraneous block > merely to do a call, instead of supplying the value in the call line. > A couple of languages already support a :cmdline header argument. I've just added shell block support for :cmdline, so the following is now possible. #+begin_src sh :cmdline "foo bar baz" echo $2 #+end_src #+RESULTS: : bar > > if making this possible is not desirable, then i will not request it, > but i wanted to explain why this object is not achieved with existing > babel options that i am aware of. > I hope the above is sufficient, if not I'm not personally able to do much more on this front, although I'm always happy to review patches. Best, > > thanks. > > samuel -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D