Karl Maihofer writes:
> * Peter Mayer :topic1:topic2:
> :PROPERTIES:
> :EMAIL: [email protected]
> :END:
> * Karl August :topic1:topic2:topic4:
> :PROPERTIES:
> :EMAIL: [email protected]
> :END:
> * Peter Müller
> :topic1:
> :PROPERTIES:
> :EMAIL: [email protected]
> :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:
> "[email protected],[email protected]" 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")
: [email protected],[email protected]
Yours,
Christian