emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [agenda] skip non-habit SCHEDULED
Date: Thu, 19 May 2011 16:47:21 -0400	[thread overview]
Message-ID: <87wrhm8lk6.fsf@fastmail.fm> (raw)
In-Reply-To: <BANLkTikDFFnUgc2uhVxEM_BS6pyC_hVKJg@mail.gmail.com> (Michael Brand's message of "Thu, 19 May 2011 21:59:50 +0200")

Michael Brand <michael.ch.brand@gmail.com> writes:

> How is it possible to skip SCHEDULED items that don't have the
> property STYLE=habit in the day-agenda of a custom agenda view?
>
> What I checked so far:
> - ((org-agenda-entry-types '(:scheduled))):
>   does not distinguish between habits and non-habits
> - "match" from (key desc type match settings files):
>   not available for "type" agenda AFAIK
> - org-agenda-skip-function: not available for type agenda AFAIK

Good news: the skip function does apply to agenda views. It provides a
means to do simple filtering in the agenda, which does not use the match
syntax of org-tags-view.

> - day-agenda block for :scheduled _habits_ only
>   (skip of non-habits not solved yet)

Here's a sample implementation (in a single custom agenda command):

--8<---------------cut here---------------start------------->8---
(org-add-agenda-custom-command
 '("x" "Agenda (habits only)" agenda ""
   ((org-agenda-entry-types '(:scheduled))
    (org-agenda-skip-function 
     '(org-agenda-skip-entry-if 'notregexp ":STYLE:.*habit")))))
--8<---------------cut here---------------end--------------->8---

Best,
Matt

  reply	other threads:[~2011-05-19 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 19:59 [agenda] skip non-habit SCHEDULED Michael Brand
2011-05-19 20:47 ` Matt Lundin [this message]
2011-05-19 21:12   ` Michael Brand

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=87wrhm8lk6.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@gmail.com \
    /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).