From: Adam Spiers <orgmode@adamspiers.org>
To: emacs-orgmode@gnu.org
Subject: Re: Re: skip-entry-if category
Date: Mon, 2 Nov 2009 14:14:08 +0000 [thread overview]
Message-ID: <20091102141408.GA32187@atlantic.linksys.moosehall> (raw)
In-Reply-To: <5B1DCDDC-405B-4D37-AD03-81F13FF00F7D@gmail.com>
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))))
prev parent reply other threads:[~2009-11-02 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20091102141408.GA32187@atlantic.linksys.moosehall \
--to=orgmode@adamspiers.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).