Karl Maihofer writes:
> * Peter Mayer                                               :topic1:topic2:
> :PROPERTIES:
> :EMAIL:    pe...@mayer.com
> :END:
> * Karl August                                        :topic1:topic2:topic4:
> :PROPERTIES:
> :EMAIL: k...@august.com
> :END:
> * Peter Müller                                                             
> :topic1:
> :PROPERTIES:
> :EMAIL:    pe...@mueller.com
> :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:
> "pe...@mayer.com,k...@august.com" 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")
: pe...@mayer.com,k...@august.com

Yours,
Christian

Reply via email to