emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Using org-agenda-filter-preset with or'd tags


From: David Maus
Subject: Re: [Orgmode] Using org-agenda-filter-preset with or'd tags
Date: Sun, 09 Jan 2011 14:58:55 +0100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Mon, 20 Dec 2010 14:12:39 +0000 (UTC),
johnt wrote:
>
> I am trying to set a custom command to show my work tasks and critical home
> tasks for the day.
>
> I have tried the following.
>
> (setq org-agenda-custom-commands
>
>       '(
>
>         ("W" "Work Schedule"
>
>          (
>
>           (agenda ""
>
>            (
>
>             (org-agenda-filter-preset '("@Work|critical"))   ;; this doesn't 
> work
>
>             (org-agenda-ndays 1)
>
>            )
>
>           )
>
>           (tags-todo "@Work|critical")
>
>          )
>
>         )
>
> )
>
> It seems just to ignore the filter. The tags-todo line works fine.
>
> I tried various filters to verify my syntax.
> using (org-agenda-filter-preset '("address@hidden")) works fine but is not 
> what I want.
> using (org-agenda-filter-preset '("@Work" "|" "critical")) also doesn't work.

There are some errors in your `org-agenda-filter-preset':

 1. You should not quote this list, because the entire structure of
    `org-agenda-custom-commands' is already quoted.

 2. Format of `org-agenda-filter-preset' (C-h v
    org-agenda-filter-preset RET):

   ,----
   | A preset of the tags filter used for secondary agenda filtering.
   | This must be a list of strings, each string must be a single tag preceded
   | by "+" or "-".
   `----

   So ("@work" "|" "critical") is wrong format.

 3. The preset filter ANDs the tags together and as far as I am aware
    of (our could think of) it is not possible to OR tags together.
    However, I wonder why you would like to set the preset-filter: The
    tags-todo query already selects only tasks that are either tagged
    @work or critical?

HTH,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: pgpYEye3qTMdR.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]