all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Agenda view: do not display tasks of projects scheduled in the future
Date: Wed, 18 Dec 2013 15:26:24 +0100	[thread overview]
Message-ID: <m2mwjyw7zj.fsf@polytechnique.org> (raw)

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	other threads:[~2013-12-18 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 14:26 Alan Schmitt [this message]
2014-01-04 17:36 ` Agenda view: do not display tasks of projects scheduled in the future Bastien
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2mwjyw7zj.fsf@polytechnique.org \
    --to=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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.