[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] How to export property values of agenda selection?
From: |
Christian Moe |
Subject: |
Re: [O] How to export property values of agenda selection? |
Date: |
Tue, 26 Mar 2013 23:53:01 +0100 |
User-agent: |
mu4e 0.9.9.5-dev6; emacs 24.3.1 |
Karl Maihofer writes:
> * Peter Mayer :topic1:topic2:
> :PROPERTIES:
> :EMAIL: address@hidden
> :END:
> * Karl August :topic1:topic2:topic4:
> :PROPERTIES:
> :EMAIL: address@hidden
> :END:
> * Peter Müller
> :topic1:
> :PROPERTIES:
> :EMAIL: address@hidden
> :END:
[...]
> What I'd like to do now is to export a comma-separated list of the email
> addresses of the entries in the agenda selection:
> "address@hidden,address@hidden" in the case above.
I don't know how to do it from the agenda selection, but here's a pretty
simple way to do it in the document buffer using Babel:
#+NAME: list2csv
#+BEGIN_SRC emacs-lisp :var match="topic2"
(mapconcat 'identity
(org-map-entries
'(org-entry-get (point) "EMAIL")
match nil)
",")
#+END_SRC
Now you can use a CALL line with a tags match as a parameter, like
#+CALL: list2csv(match="topic2")
to get
#+RESULTS: list2csv(match="topic2")
: address@hidden,address@hidden
Yours,
Christian