From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: #+call split into multiple lines? Date: Thu, 28 Mar 2013 11:51:03 -1000 Message-ID: References: <86ip4bw6yd.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULKjC-0000f7-Pj for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULKjB-0002yg-C0 for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:51:22 -0400 Received: from plane.gmane.org ([80.91.229.3]:57817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULKjB-0002yO-5I for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:51:21 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ULKjU-00007K-4d for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 22:51:40 +0100 In-Reply-To: <86ip4bw6yd.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 28 Mar 2013 22:27:38 +0100") 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: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Aloha Seb, "Sebastien Vauban" writes: > Hi Thomas, > > Thomas S. Dye wrote: >> In this situation I often put the arguments in a named Org table and >> then write the Babel source code block to take a single argument--the >> table name--and parse the information passed in that way. >> >> #+name: card-table >> | cname | gname | photo | etc.| >> | Dr. Stefan Vollmar | Stefan | stefan-vollmar.jpg | ... | >> | Dr. Stefan Vollmar, Jr. | Stefan Jr. | stefan-vollmar-jr.jpg | ... | >> >> >> #+call: mhead-hcard(card=card-table[0,]) for Stefan >> >> #+call: mhead-hcard(card=card-table[1,]) for Stefan Jr. >> >> If you don't mind writing some extra code for the Babel function, then >> >> #+call: mhead-hcard(card=card-table,gname="Stefan") >> >> etc. > > And do you eventually have a way to write a "for-loop" for all the lines of > the tables, not being forced to write as many calls as the number of lines you > do have? > > I don't see (immediately) how to do such, but that would really allow to > promote such a use case! Not sure I understand your question. Perhaps I misunderstood Stefan's use case? There are several languages supported by Babel that have loop constructs. I was assuming that Stefan would use one of these when I suggested the possibility of writing some extra code. All the best, Tom -- Thomas S. Dye http://www.tsdye.com