emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Manuel Hermenegildo <herme@fi.upm.es>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: Bernt Hansen <bernt@norang.ca>,
	org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Re: Switching between many contexts
Date: Tue, 3 Mar 2009 07:20:34 +0100	[thread overview]
Message-ID: <18860.52274.876829.329373@clip.dia.fi.upm.es> (raw)
In-Reply-To: <CE3E11C1-D2C2-4E63-BE9A-853C4200C5C0@uva.nl>


> For this you would indeed you a skip function.
>
> E.g.,
>
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-custom-commands
>      '(("A" agenda ""
> 	 ((org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp  
> ":TAG:"))))))
> --8<---------------cut here---------------end--------------->8---

This is what I use as filter, which covers the issue of inheritance
and a small optimization (at least for my org files):

(defun my-skip-by-tags (tag)
  "Skip tasks except those that contain tag (with
inheritance!). "
  (let ((line-end (save-excursion (progn (end-of-line) (point))))) ;; return pos
    (if (or 
	 (member tag (org-get-local-tags)) ;; check first if only local (speed)
	 (member tag (org-get-tags-at (point)))) ;; also inherited
	nil ; do not skip
      line-end))) ; skip, continue after that

Cheers,

Manuel

-- 
-------------------------------------------------------------------------------
 Manuel Hermenegildo                     | Prof., C.S.Dept., T.U. Madrid (UPM)
 Director, IMDEA-Software and CLIP Group | +34-91-336-7435 (W) -352-4819 (Fax)
-------------------------------------------------------------------------------

  reply	other threads:[~2009-03-03 15:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 18:03 Switching between many contexts Daniel Clemente
2009-03-02 18:21 ` Samuel Wales
2009-03-02 18:34   ` Bernt Hansen
2009-03-03 11:27     ` Daniel Clemente
2009-03-03 13:05       ` Matthew Lundin
2009-03-03 13:31         ` Carsten Dominik
2009-03-03  6:20           ` Manuel Hermenegildo [this message]
2009-03-04  6:17           ` Carsten Dominik
2009-03-04 10:01             ` Daniel Clemente
2009-03-05 18:41           ` Auto-saving/loading files (without prompts) David Thole
2009-03-06 15:21             ` Jason F. McBrayer
2009-03-02 18:31 ` Switching between many contexts Bernt Hansen
2009-03-02 21:47 ` Matthew Lundin

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=18860.52274.876829.329373@clip.dia.fi.upm.es \
    --to=herme@fi.upm.es \
    --cc=bernt@norang.ca \
    --cc=dominik@science.uva.nl \
    --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).