emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Custom agenda view by TODO state and tag


From: Matt Lundin
Subject: Re: [O] Custom agenda view by TODO state and tag
Date: Tue, 26 Apr 2011 08:04:45 -0400
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

Laurynas Biveinis <address@hidden> writes:

> I want to create a custom agenda view that filters by both TODO state
> and tags, i.e. a combination of todo and tags-todo search types. I
> have tried creating custom search action
> ((org-agenda-todo "TODO") (org-agenda-filter "tag1|tag2")) but failed.

The easiest way is to do a simple search.

1. If you want just one tag, you can use:

   C-c a M TODO="TODO"+tag1

2. To find TODO *and* (tag1 *or* tag2):

    C-c a M TODO="TODO"+ALLTAGS={tag1\|tag2}

3. If you call this often, you can automate the search with a custom
   agenda command:

   (org-add-agenda-custom-command
    '("x" "TODO + tag1|tag2" tags-todo "TODO=\"TODO\"+ALLTAGS={tag1\\|tag2}"))

   Or you could use a block agenda:

   (org-add-agenda-custom-command
    '("x" "TODO + tag1|tag2" 
      ((tags-todo "TODO=\"TODO\"+tag1")
       (tags-todo "TODO=\"TODO\"+tag2"))))

   See the following for more information:

   (info "(org) Matching tags and properties")
   http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html
   http://orgmode.org/worg/org-tutorials/advanced-searching.html

Best,
Matt



reply via email to

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