emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export to iCalendar only not DONE, scheduled tasks?


From: Chris Poole
Subject: Re: [O] Export to iCalendar only not DONE, scheduled tasks?
Date: Sat, 10 May 2014 15:55:29 +0100

On Mon, May 5, 2014 at 11:08 PM, Arun Persaud <address@hidden> wrote:
pretty sure this can be done. I export only events to an ics file that
have a start and an end date and are not in a certain category. For this
I use

That's great, thank you. I have this, but it doesn't work:

(defun filter-scheduled-todo-tasks (content backend info)
  "Filter iCalendar export to include only TODO tasks that are
not done, but which are scheduled or have a deadline."
  (when (eq backend 'icalendar)
    (if (and (org-entry-is-todo-p)
             (not (org-entry-is-done-p))
             (or (org-get-scheduled-time (point))
                 (org-get-deadline-time (point))))
        content nil)))

... called with:

(let ((org-export-filter-final-output-functions
         '(filter-scheduled-todo-tasks)))
    (org-icalendar-combine-agenda-files))

I have (setq org-icalendar-include-todo t) too.

Using edebug, it seems that the `content' argument only iterates through the top-level headings of each of my agenda files. I was assuming it'd iterate through each subheading too --- do I need to do this manually?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]