* skip-entry-if category
@ 2009-08-22 3:29 Memnon Anon
2009-08-22 13:47 ` Matt Lundin
0 siblings, 1 reply; 5+ messages in thread
From: Memnon Anon @ 2009-08-22 3:29 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I am experimenting with different custom agenda views, and this area is,
as always, excellently documented, thank you all!
However, there is one thing I am not able to figure out:
Using skipping, it is easy to limit my daily agenda to certain tags like:
(org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp ":STUDIUM:"))))
Is it possible to do the same with Categories?
I think there must be a way, but all my attempts did not work :(.
Have a nice day ;)!
Memnon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: skip-entry-if category
2009-08-22 3:29 skip-entry-if category Memnon Anon
@ 2009-08-22 13:47 ` Matt Lundin
2009-08-23 10:41 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2009-08-22 13:47 UTC (permalink / raw)
To: Memnon Anon; +Cc: emacs-orgmode
Hi Memnon
Memnon Anon wrote:
> However, there is one thing I am not able to figure out:
>
> Using skipping, it is easy to limit my daily agenda to certain tags like:
> (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp ":STUDIUM:"))))
>
> Is it possible to do the same with Categories?
> I think there must be a way, but all my attempts did not work :(.
I believe this is not possible with the built in org agenda skip
functions, since they search only the text within the subtree and do
not recognize inherited tags and properties.
However, I suspect that one could build a skip function using
org-entry-properties that would accomplish this goal.
Best,
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: skip-entry-if category
2009-08-22 13:47 ` Matt Lundin
@ 2009-08-23 10:41 ` Carsten Dominik
2009-08-23 22:52 ` Memnon Anon
2009-11-02 14:14 ` Adam Spiers
0 siblings, 2 replies; 5+ messages in thread
From: Carsten Dominik @ 2009-08-23 10:41 UTC (permalink / raw)
To: Matt Lundin; +Cc: Memnon Anon, emacs-orgmode
On Aug 22, 2009, at 2:47 PM, Matt Lundin wrote:
> Hi Memnon
>
> Memnon Anon wrote:
>> However, there is one thing I am not able to figure out:
>>
>> Using skipping, it is easy to limit my daily agenda to certain tags
>> like:
>> (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp
>> ":STUDIUM:"))))
>>
>> Is it possible to do the same with Categories?
>> I think there must be a way, but all my attempts did not work :(.
>
> I believe this is not possible with the built in org agenda skip
> functions, since they search only the text within the subtree and do
> not recognize inherited tags and properties.
>
> However, I suspect that one could build a skip function using
> org-entry-properties that would accomplish this goal.
Much faster in this special case will be to use `org-get-category'
instead of accessing all properties of the entry with
org-entry-properties.
- Carsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: skip-entry-if category
2009-08-23 10:41 ` Carsten Dominik
@ 2009-08-23 22:52 ` Memnon Anon
2009-11-02 14:14 ` Adam Spiers
1 sibling, 0 replies; 5+ messages in thread
From: Memnon Anon @ 2009-08-23 22:52 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <carsten.dominik@gmail.com> writes:
> On Aug 22, 2009, at 2:47 PM, Matt Lundin wrote:
>> I believe this is not possible with the built in org agenda skip
>> functions, since they search only the text within the subtree and do
>> not recognize inherited tags and properties.
>>
>> However, I suspect that one could build a skip function using
>> org-entry-properties that would accomplish this goal.
>
> Much faster in this special case will be to use `org-get-category'
> instead of accessing all properties of the entry with
> org-entry-properties.
I think I will just start adding tags to each item.
Thanks for all the answers!
Memnon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: skip-entry-if category
2009-08-23 10:41 ` Carsten Dominik
2009-08-23 22:52 ` Memnon Anon
@ 2009-11-02 14:14 ` Adam Spiers
1 sibling, 0 replies; 5+ messages in thread
From: Adam Spiers @ 2009-11-02 14:14 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik (carsten.dominik@gmail.com) wrote:
> On Aug 22, 2009, at 2:47 PM, Matt Lundin wrote:
> >Hi Memnon
> >
> >Memnon Anon wrote:
> >>However, there is one thing I am not able to figure out:
> >>
> >>Using skipping, it is easy to limit my daily agenda to certain
> >>tags like:
> >>(org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp
> >>":STUDIUM:"))))
> >>
> >>Is it possible to do the same with Categories?
> >>I think there must be a way, but all my attempts did not work :(.
> >
> >I believe this is not possible with the built in org agenda skip
> >functions, since they search only the text within the subtree and do
> >not recognize inherited tags and properties.
> >
> >However, I suspect that one could build a skip function using
> >org-entry-properties that would accomplish this goal.
>
> Much faster in this special case will be to use `org-get-category'
> instead of accessing all properties of the entry with
> org-entry-properties.
I wrote the following to accomplish this, but it would be much nicer
if you could use (org-agenda-skip-entry-if 'category "mycategory").
(defun org-agenda-skip-select-category-function (category-to-select)
"Creates a function suitable for use with
`org-agenda-skip-function' which skips all items except for those
in the provided category."
`(lambda ()
(if (equal (org-get-category) ,category-to-select)
nil ;; don't skip
;; The invisible-ok param below seems to be needed
;; in order to avoid infinite loops:
(org-end-of-subtree t))))
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-02 14:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22 3:29 skip-entry-if category Memnon Anon
2009-08-22 13:47 ` Matt Lundin
2009-08-23 10:41 ` Carsten Dominik
2009-08-23 22:52 ` Memnon Anon
2009-11-02 14:14 ` Adam Spiers
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).