From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: difference between "#+source" and "#+srcname"; passing parameters to Awk. Date: Sun, 28 Aug 2011 09:04:06 -0600 Message-ID: <87y5yda85b.fsf@gmail.com> References: <20110826190032.DDB9C1D54C0@stat.fsu.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxgve-0006sp-4p for emacs-orgmode@gnu.org; Sun, 28 Aug 2011 11:05:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxgvc-0000ds-KS for emacs-orgmode@gnu.org; Sun, 28 Aug 2011 11:05:42 -0400 Received: from mail-gx0-f169.google.com ([209.85.161.169]:39491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxgvc-0000dm-91 for emacs-orgmode@gnu.org; Sun, 28 Aug 2011 11:05:40 -0400 Received: by gxk23 with SMTP id 23so4430625gxk.0 for ; Sun, 28 Aug 2011 08:05:39 -0700 (PDT) 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: Feiming Chen Cc: emacs-org-list Feiming Chen writes: > Hi, I'd like to ask two questions. > > 1. What'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="~/tmp/a") > #+begin_src awk > > #+end_src > > fails upon "C-c C-v v" (org-babel-expand-src-block) with error: "wrong type > argument: sequencep, file". So does: > > #+begin_src awk :var file="~/tmp/a" > > #+end_src > > In comparison, it works with a Perl code block: > > #+srcname: subset(file="~/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/