From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: How to export property values of agenda selection? Date: Tue, 26 Mar 2013 23:53:01 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKciU-0002Z7-Q2 for emacs-orgmode@gnu.org; Tue, 26 Mar 2013 18:51:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKciT-0006W9-HT for emacs-orgmode@gnu.org; Tue, 26 Mar 2013 18:51:42 -0400 Received: from mail2.b1.hitrost.net ([91.185.211.205]:31534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKciT-0006VV-BF for emacs-orgmode@gnu.org; Tue, 26 Mar 2013 18:51:41 -0400 In-reply-to: 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: Karl Maihofer Cc: emacs-orgmode@gnu.org Karl Maihofer writes: > * Peter Mayer :topic1:topic2: > :PROPERTIES: > :EMAIL: peter@mayer.com > :END: > * Karl August :topic1:topic2:topic4: > :PROPERTIES: > :EMAIL: karl@august.com > :END: > * Peter Müller :topic1: > :PROPERTIES: > :EMAIL: peter@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: > "peter@mayer.com,karl@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") : peter@mayer.com,karl@august.com Yours, Christian