emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Agenda view: do not display tasks of projects scheduled in the futur


From: Alan Schmitt
Subject: [O] Agenda view: do not display tasks of projects scheduled in the future
Date: Wed, 18 Dec 2013 15:26:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

Hello,

I would like to tweak my agenda views such that tasks belonging to
projects scheduled in the future are not shown. I've searched a bit
about this and I found out that deadlines and schedules are not
inherited, so that approach would not work. I'm thus trying to tweak a
custom skip function to jump over any headline scheduled for the future.

I looked into org.el but could not find a way to write a predicate
"org-entry-scheduled-in-future-p" that is true when an entry is
scheduled in the future. I would use it for the following skipping
command:

#+BEGIN_SRC emacs-lisp
(defun as/skip-future-tasks ()
  "Skip future tasks"
  (save-restriction
    (widen)
    (let ((subtree-end (save-excursion (org-end-of-subtree t))))
      (cond
       ((org-entry-scheduded-in-future-p)
        subtree-end)
       (t
        nil)))))
#+END_SRC

Any suggestion as how I might write such a predicate?

Thanks,

Alan



reply via email to

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