[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Agenda view: do not display tasks of projects scheduled in the f
From: |
Bastien |
Subject: |
Re: [O] Agenda view: do not display tasks of projects scheduled in the future |
Date: |
Sat, 04 Jan 2014 18:36:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi Alan,
Alan Schmitt <address@hidden> writes:
> #+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?
Coming late so maybe it's not useful anymore, but here is a stab:
(defun org-entry-scheduded-in-future-p ()
(interactive)
(let ((sc (org-get-scheduled-time (point)))
;; (dl (org-get-deadline-time (point)))
;; (ts (org-time-string-to-time (org-entry-get (point) "TIMESTAMP")))
(ct (current-time)))
(time-less-p ct sc)))
--
Bastien
- Re: [O] Agenda view: do not display tasks of projects scheduled in the future,
Bastien <=