* [agenda] skip non-habit SCHEDULED @ 2011-05-19 19:59 Michael Brand 2011-05-19 20:47 ` Matt Lundin 0 siblings, 1 reply; 3+ messages in thread From: Michael Brand @ 2011-05-19 19:59 UTC (permalink / raw) To: Org Mode Hi all 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 What I try to achieve with this are two overview custom agenda views: the 1st like a calendar view with - day-agenda block for :timestamp and :sexp - day-agenda block for :deadline - day-agenda block for :scheduled _habits_ only (skip of non-habits not solved yet) a 2nd like a todo view for everything else that "never" expires with - day-agenda block for :scheduled _non-habits_ only (skip habits with "((org-habit-show-habits nil))") - tags-todo block for all TODO without any date (org-agenda-skip-entry-if 'timestamp) Michael ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [agenda] skip non-habit SCHEDULED 2011-05-19 19:59 [agenda] skip non-habit SCHEDULED Michael Brand @ 2011-05-19 20:47 ` Matt Lundin 2011-05-19 21:12 ` Michael Brand 0 siblings, 1 reply; 3+ messages in thread From: Matt Lundin @ 2011-05-19 20:47 UTC (permalink / raw) To: Michael Brand; +Cc: Org Mode 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [agenda] skip non-habit SCHEDULED 2011-05-19 20:47 ` Matt Lundin @ 2011-05-19 21:12 ` Michael Brand 0 siblings, 0 replies; 3+ messages in thread From: Michael Brand @ 2011-05-19 21:12 UTC (permalink / raw) To: Matt Lundin; +Cc: Org Mode Hi Matt On Thu, May 19, 2011 at 22:47, Matt Lundin <mdl@imapmail.org> wrote: > Michael Brand <michael.ch.brand@gmail.com> writes: >> - org-agenda-skip-function: not available for type agenda AFAIK > > Good news: the skip function does apply to agenda views. Thank you for pointing this out and for the example that does exactly what I asked for. I thought that org-agenda-skip-function is not available for the type agenda from checking the doc. Could the doc be changed by adding @code {agenda} like this?: ---------------------------------------- diff --git a/doc/org.texi b/doc/org.texi index aa34cd3..6b469cc 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -14376,12 +14376,12 @@ other block) with @code{org-narrow-to-block}. @vindex org-agenda-skip-function @vindex org-agenda-skip-function-global Org provides a special hook that can be used to narrow down the selection -made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, -@code{tags-todo}, @code{tags-tree}. You may specify a function that is used -at each match to verify if the match should indeed be part of the agenda -view, and if not, how much should be skipped. You can specify a global -condition that will be applied to all agenda views, this condition would be -stored in the variable @code{org-agenda-skip-function-global}. More +made by these agenda views: @code{agenda}, @code{todo}, @code{alltodo}, +@code{tags}, @code{tags-todo}, @code{tags-tree}. You may specify a function +that is used at each match to verify if the match should indeed be part of +the agenda view, and if not, how much should be skipped. You can specify a +global condition that will be applied to all agenda views, this condition +would be stored in the variable @code{org-agenda-skip-function-global}. More commonly, such a definition is applied only to specific custom searches, using @code{org-agenda-skip-function}. ---------------------------------------- Michael ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-19 21:12 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-05-19 19:59 [agenda] skip non-habit SCHEDULED Michael Brand 2011-05-19 20:47 ` Matt Lundin 2011-05-19 21:12 ` Michael Brand
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).