emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: johnt <jtarbotton@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Using org-agenda-filter-preset with or'd tags
Date: Sun, 09 Jan 2011 14:58:55 +0100	[thread overview]
Message-ID: <87tyhikwkg.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <loom.20101220T145637-70@post.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1754 bytes --]

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 '("+@Work")) 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.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2011-01-09 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 14:12 Using org-agenda-filter-preset with or'd tags johnt
2011-01-09 13:58 ` David Maus [this message]
2011-01-10 18:01   ` John Tarbotton
2011-01-11 13:20   ` Matt Lundin
2011-01-11 13:22     ` Matt Lundin
2011-01-11 23:01       ` John Tarbotton
2011-01-11 14:01     ` Carsten Dominik

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=87tyhikwkg.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=jtarbotton@gmail.com \
    /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).