From mboxrd@z Thu Jan 1 00:00:00 1970 From: Feiming Chen Subject: Re: difference between "#+source" and "#+srcname"; passing parameters to Awk. Date: Mon, 12 Sep 2011 19:22:14 -0700 (PDT) Message-ID: <1315880534.74971.YahooMailClassic@web81701.mail.mud.yahoo.com> References: <87y5yda85b.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1310656866-1315880534=:74971" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3Idf-0007ny-AN for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 22:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3Idd-0007Hx-3B for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 22:22:19 -0400 Received: from nm23.access.bullet.mail.mud.yahoo.com ([66.94.237.88]:38115) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1R3Idc-0007Hp-T0 for emacs-orgmode@gnu.org; Mon, 12 Sep 2011 22:22:17 -0400 In-Reply-To: <87y5yda85b.fsf@gmail.com> 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: Eric Schulte Cc: emacs-org-list --0-1310656866-1315880534=:74971 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Eric:=A0=A0 Thanks a lot for your answers!=A0 Sorry for my late reply.= =A0=20 Sincerely,=20 =0AFeiming Chen --- On Sun, 8/28/11, Eric Schulte wrote: From: Eric Schulte Subject: Re: [O] difference between "#+source" and "#+srcname"; passing par= ameters to Awk. To: "Feiming Chen" Cc: "emacs-org-list" Date: Sunday, August 28, 2011, 10:04 AM Feiming Chen writes: > Hi, I'd like to ask two questions.=20 > > 1. What's the difference between header options "#+source" and "#+srcname= "? > They seem to have identical utilities.=20 > No difference, these are synonyms for the same thing. > > 2. I'd like to pass parameters (filenames) to Awk (language) code block, > but=20 > > #+srcname: subset(file=3D"~/tmp/a") > #+begin_src awk >=A0 =A0=A0=A0 > #+end_src > > fails upon "C-c C-v v" (org-babel-expand-src-block) with error: "wrong ty= pe > argument: sequencep, file".=A0 So does: > > #+begin_src awk :var file=3D"~/tmp/a" > > #+end_src > > In comparison, it works with a Perl code block:=20 > > #+srcname: subset(file=3D"~/tmp/a") > #+begin_src perl=20 > > #+end_src > > Thanks a lot!=20 > This is actually a bug in ob-awk.=A0 I've just pushed up a fix so your example should work with the latest git HEAD. Thanks -- Eric > > -- Feiming Chen > --=20 Eric Schulte http://cs.unm.edu/~eschulte/ --0-1310656866-1315880534=:74971 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Eric:   Thanks a lot for your an= swers!  Sorry for my late reply. 

Sincerely,
=0AFeimi= ng Chen

--- On Sun, 8/28/11, Eric Schulte <schulte.eric@gma= il.com> wrote:

From: Eric Schult= e <schulte.eric@gmail.com>
Subject: Re: [O] difference between "#+= source" and "#+srcname"; passing parameters to Awk.
To: "Feiming Chen"= <feimingchen@yahoo.com>
Cc: "emacs-org-list" <emacs-orgmode@gn= u.org>
Date: Sunday, August 28, 2011, 10:04 AM

Feiming Chen <feimingchen@yahoo.com> w= rites:

> Hi, I'd like to ask two questions.
>
> 1. W= hat's the difference between header options "#+source" and "#+srcname"?
= > They seem to have identical utilities.
>

No difference, = these are synonyms for the same thing.

>
> 2. I'd like to pass parameters (filenames) to Awk (language) code block,
> but
= >
> #+srcname: subset(file=3D"~/tmp/a")
> #+begin_src awk>     
> #+end_src
>
> fails upon= "C-c C-v v" (org-babel-expand-src-block) with error: "wrong type
> a= rgument: sequencep, file".  So does:
>
> #+begin_src awk := var file=3D"~/tmp/a"
>
> #+end_src
>
> In compariso= n, it works with a Perl code block:
>
> #+srcname: subset(file= =3D"~/tmp/a")
> #+begin_src perl
>
> #+end_src
>> Thanks a lot!
>

This is actually a bug in ob-awk. = ; I've just pushed up a fix so your
example should work with the latest = git HEAD.

Thanks -- Eric

>
> -- Feiming Chen
>=

--
Eric Schulte
http://cs.unm.edu/~eschulte/
<= /td>
--0-1310656866-1315880534=:74971--