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:17:30 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULKCv-0000FT-I2 for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULKCs-0000re-UX for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:18:01 -0400 Received: from oproxy13-pub.unifiedlayer.com ([69.89.16.30]:47739) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1ULKCs-0000qQ-L7 for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:17:58 -0400 In-Reply-To: (Stefan Vollmar's message of "Thu, 28 Mar 2013 21:49:22 +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: Stefan Vollmar Cc: Org Mode Mailing List Aloha Stefan, 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. hth, Tom Stefan Vollmar writes: > Hallo, > > I am a new Org-Babel convert (thanks, Nicolas!) and our first project > replaces a MACRO (raw HTML template) with 12+ arguments and is a major > improvement as we can now use named arguments. > > This short example works: > > #+call: mhead-hcard(cname="Dr. Stefan Vollmar",gname="Stefan",prefix="Dr.",web="stefan-vollmar.html",photo="stefan-vollmar.jpg") :results html > > However, this only uses only four of 12+ arguments and - from my point > of view - already suffers from being written in one line. > > We have listed some of our attempts to increase readability (none of > them works with release_8.0-pre-193-gaa7b1e). > > (1) "natural" multi-line > > #+call: mhead-hcard( > cname="Dr. Stefan Vollmar", # full name for title > gname="Stefan", # given name > photo="stefan-vollmar.jpg", # can be jpg or png > ...) > > (2) Attempt in keeping with a multi-line #+header construct > > #+call: mhead-hcard( > #+call: cname="Dr. Stefan Vollmar", # full name for headline > #+call: gname="Stefan", # given name > #+call: photo="stefan-vollmar.jpg", # can be jpg or png > ... > > (3) Using a "line continuation marker" > > #+call: mhead-hcard( > cname="Dr. Stefan Vollmar",\ > gname="Stefan",\ > photo="stefan-vollmar.jpg",\ > ...) > > Maybe even with optional comments: > > #+call: mhead-hcard( > cname="Dr. Stefan Vollmar",\ # full name for headline > gname="Stefan",\ # given name > photo="stefan-vollmar.jpg",\ # can be jpg or png > ...) > > Maybe there already is a good solution to increase readability? Maybe > the "line continuation marker" (3) would be a general solution for all > cases in org where now no line breaks are possible? > > Many thanks for any help with this. > Warm regards, > Stefan -- Thomas S. Dye http://www.tsdye.com