From: Christian Moe <mail@christianmoe.com>
To: Karl Maihofer <ignoramus@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to export property values of agenda selection?
Date: Tue, 26 Mar 2013 23:53:01 +0100 [thread overview]
Message-ID: <m238vhn581.fsf@christianmoe.com> (raw)
In-Reply-To: <loom.20130326T184953-124@post.gmane.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
next prev parent reply other threads:[~2013-03-26 22:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 17:51 How to export property values of agenda selection? Karl Maihofer
2013-03-26 22:53 ` Christian Moe [this message]
2013-03-27 18:08 ` Karl Maihofer
2013-04-06 12:48 ` Karl Maihofer
2013-04-07 7:06 ` Christian Moe
2013-04-08 9:00 ` Karl Maihofer
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=m238vhn581.fsf@christianmoe.com \
--to=mail@christianmoe.com \
--cc=emacs-orgmode@gnu.org \
--cc=ignoramus@gmx.de \
/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).