From: Bastien <bzg@gnu.org>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Agenda view: do not display tasks of projects scheduled in the future
Date: Sat, 04 Jan 2014 18:36:32 +0100 [thread overview]
Message-ID: <8738l3zm1r.fsf@bzg.ath.cx> (raw)
In-Reply-To: <m2mwjyw7zj.fsf@polytechnique.org> (Alan Schmitt's message of "Wed, 18 Dec 2013 15:26:24 +0100")
Hi Alan,
Alan Schmitt <alan.schmitt@polytechnique.org> 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
next prev parent reply other threads:[~2014-01-04 17:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 14:26 Agenda view: do not display tasks of projects scheduled in the future Alan Schmitt
2014-01-04 17:36 ` Bastien [this message]
2014-01-05 10:32 ` Alan Schmitt
2014-01-05 10:44 ` Bastien
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=8738l3zm1r.fsf@bzg.ath.cx \
--to=bzg@gnu.org \
--cc=alan.schmitt@polytechnique.org \
--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).