From: Giovanni Ridolfi <giovanni.ridolfi@yahoo.it>
To: Richard Parsons <richard.lee.parsons@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Merge Properties into Template; [babel]
Date: Thu, 06 Oct 2011 12:40:33 +0200 [thread overview]
Message-ID: <83mxdetnby.fsf@yahoo.it> (raw)
In-Reply-To: <CAB+=1LF4uFw4BFfZXa4S6-dma4DOCi5H-7j571ZcLPOVBt_thg@mail.gmail.com> (Richard Parsons's message of "Thu, 6 Oct 2011 10:35:49 +0100")
Richard Parsons <richard.lee.parsons@gmail.com> 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
next prev parent reply other threads:[~2011-10-06 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 9:35 Merge Properties into Template Richard Parsons
2011-10-06 10:40 ` Giovanni Ridolfi [this message]
2011-10-06 11:35 ` suvayu ali
2011-10-06 12:50 ` Christian Moe
2011-10-06 15:56 ` Richard Parsons
2011-10-06 20:52 ` Christian Moe
2011-10-07 7:04 ` Christian Moe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mxdetnby.fsf@yahoo.it \
--to=giovanni.ridolfi@yahoo.it \
--cc=emacs-orgmode@gnu.org \
--cc=richard.lee.parsons@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).