emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: "Peter Münster" <pmlists@free.fr>, emacs-orgmode@gnu.org
Subject: Re: get all todo items as lisp list
Date: Sun, 19 Feb 2012 11:57:58 +0100	[thread overview]
Message-ID: <874nunw0nd.fsf@gmail.com> (raw)
In-Reply-To: <811uprfmbz.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 19 Feb 2012 10:31:36 +0530")


Jambunathan K <kjambunathan@gmail.com> writes:

>> Given a todo list in an org file, is there already a function, that
>> converts this list to an elisp list, that contains at least heading,
>> deadline and properties?
> Create the following interactive function. This functions exports Org
> file to a *pretty* lisp file.
> (defun org-export-as-lisp ()
>   (interactive)
>   (or (featurep 'pp) (require 'pp))
>   (let ((out-file
> 	 (concat (file-name-sans-extension (buffer-file-name)) ".el")))
>     (pp-display-expression (org-element-parse-buffer) "*Org Data*")
>     (with-current-buffer "*Org Data*"

Nice example.

Also, the OP may replace (org-element-parse-buffer) with
(org-element-parse-buffer 'headline) for quicker results, since parsed
headlines already contain all the required information.


Nicolas Goaziou

      reply	other threads:[~2012-02-19 10:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-18 17:41 get all todo items as lisp list Peter Münster
2012-02-19  0:28 ` Eric Abrahamsen
2012-02-19  5:01 ` Jambunathan K
2012-02-19 10:57   ` Nicolas Goaziou [this message]

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:

  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=874nunw0nd.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@gmail.com \
    --cc=pmlists@free.fr \


* 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


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).