From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Poole Subject: Re: Export to iCalendar only not DONE, scheduled tasks? Date: Sat, 10 May 2014 15:55:29 +0100 Message-ID: References: <53680BEB.2070804@lbl.gov> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e01184a72c0edbc04f90ce7aa Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj8ge-0004os-PA for emacs-orgmode@gnu.org; Sat, 10 May 2014 10:55:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wj8gV-00056d-Gb for emacs-orgmode@gnu.org; Sat, 10 May 2014 10:55:40 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:37522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wj8gV-000547-BW for emacs-orgmode@gnu.org; Sat, 10 May 2014 10:55:31 -0400 Received: by mail-oa0-f45.google.com with SMTP id l6so6260462oag.4 for ; Sat, 10 May 2014 07:55:30 -0700 (PDT) In-Reply-To: <53680BEB.2070804@lbl.gov> 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: Arun Persaud Cc: "emacs-orgmode@gnu.org" --089e01184a72c0edbc04f90ce7aa Content-Type: text/plain; charset=UTF-8 On Mon, May 5, 2014 at 11:08 PM, Arun Persaud 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? --089e01184a72c0edbc04f90ce7aa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On M= on, May 5, 2014 at 11:08 PM, Arun Persaud <apersaud@lbl.gov> = wrote:
pretty sure this can be done. I export only events to an i= cs 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 ha= ve this, but it doesn't work:

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

... called with:

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

I have (setq=C2=A0org-icalendar-include-todo t) too.

<= /div>
Using edebug, it seems that the `content' argument only itera= tes through the top-level headings of each of my agenda files. I was assumi= ng it'd iterate through each subheading too --- do I need to do this ma= nually?
--089e01184a72c0edbc04f90ce7aa--