emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Chris Poole <lists@chrispoole.com>
To: Arun Persaud <apersaud@lbl.gov>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Export to iCalendar only not DONE, scheduled tasks?
Date: Sat, 10 May 2014 15:55:29 +0100	[thread overview]
Message-ID: <CAF=P9QDAV2XnJgwRGds_-XjkWR4na3vtUbOw4oHkwVpD8egKpg@mail.gmail.com> (raw)
In-Reply-To: <53680BEB.2070804@lbl.gov>

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

On Mon, 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 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?

[-- Attachment #2: Type: text/html, Size: 1800 bytes --]

  reply	other threads:[~2014-05-10 14:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-04 17:03 Export to iCalendar only not DONE, scheduled tasks? Chris Poole
2014-05-05 22:08 ` Arun Persaud
2014-05-10 14:55   ` Chris Poole [this message]
2014-05-14 22:31     ` Arun Persaud
2014-05-16 21:22       ` Chris Poole
2014-06-01 16:56       ` Chris Poole
2014-05-06 10:02 ` Bastien
2014-05-07 11:15   ` Chris Poole

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='CAF=P9QDAV2XnJgwRGds_-XjkWR4na3vtUbOw4oHkwVpD8egKpg@mail.gmail.com' \
    --to=lists@chrispoole.com \
    --cc=apersaud@lbl.gov \
    --cc=emacs-orgmode@gnu.org \
    /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).