From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Ridolfi Subject: Re: Merge Properties into Template; [babel] Date: Thu, 06 Oct 2011 12:40:33 +0200 Message-ID: <83mxdetnby.fsf@yahoo.it> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBlNM-0003Qm-6L for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 06:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBlNK-0006Qd-Sr for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 06:40:28 -0400 Received: from nm23-vm4.bullet.mail.ukl.yahoo.com ([217.146.176.134]:45500) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RBlNK-0006QD-Fv for emacs-orgmode@gnu.org; Thu, 06 Oct 2011 06:40:26 -0400 In-Reply-To: (Richard Parsons's message of "Thu, 6 Oct 2011 10:35:49 +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: Richard Parsons Cc: emacs-orgmode@gnu.org Richard Parsons writes: Hi Richard, > > I have a node with properties and I would like to merge that data into > a template. For example: > > * Dogs > ** Fido > :PROPERTIES: > :BREED: West Highland Terrier > :COLOR: White > :AGE: 2 > :END: > * Templates > ** Dog Template > Your dog, called [HEADLINE], is a [COLOR] [BREED], who is [AGE] years old. > > I want to merge the item called "Fido" into the template called "Dog Template". > > Could someone point me to the right bit of the manual I think that the only way to extract the information of a property, in org, is column view.[1] However you may be able to use something like perl or awk to extract the info and babel to use in the org file. I'm a babel ignorant. CCed Eric Schulte for help ;-) hth, Giovanni [1] But you'll end with this: * DOGS ** Fido :PROPERTIES: :ID: dog :COLUMNS: %dog %ITEM %is %BREED %whos %AGE %old :dog: Your dog, called :is: , is a :BREED: West Highland Terrier :COLOR: White :whos: , who is :AGE: 2 :old: years old. :END: ** Templates *** Dog Template Your dog, called [HEADLINE], is a [COLOR] [BREED], who is [AGE] years old. *** Dog column #+BEGIN: columnview :hlines 1 :id dog | dog | ITEM | is | BREED | whos | AGE | old | |------------------+---------+--------+-----------------------+----------+-----+------------| | Your dog, called | ** Fido | , is a | West Highland Terrier | , who is | 2 | years old. | #+END