[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] get all todo items as lisp list
From: |
Nicolas Goaziou |
Subject: |
Re: [O] get all todo items as lisp list |
Date: |
Sun, 19 Feb 2012 11:57:58 +0100 |
Hello,
Jambunathan K <address@hidden> 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.
Regards,
--
Nicolas Goaziou