emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thomas Wallrafen <lists@ranulf.de>
To: emacs-orgmode@gnu.org
Subject: org-agenda-custom-commands clarification on filters needed
Date: Sun, 28 Aug 2011 13:40:11 +0200	[thread overview]
Message-ID: <20110828114011.GA26758@mail3.twallrafen.de> (raw)

Hi org'ers,

I am currently trying to figure out a way to build a composite view for
an agenda containing agenda and todos, which works well but when it
comes to setting filters...

In the first example (agenda and todo list below) the filter "+home" for
the agenda does not take effect. When reordering that the todo list is
on top and the agenda below, it works as expected. That is, both items
of the composite view are correctly filtered with tag "+home".

#+begin_src elisp
(setq org-agenda-custom-commands
	  '(("h" "Agenda and home related todos" (
		  (agenda "" ((org-agenda-filter-preset '("+home")) (org-agenda-span 4)))
		  (tags-todo "+home")
		  ))))


(setq org-agenda-custom-commands
	  '(("h" "Agenda and home related todos" (
		  (tags-todo "+home")
		  (agenda "" ((org-agenda-filter-preset '("+home")) (org-agenda-span 4)))
		  ))))

#+end_src


Having a discussion with Thumper_ on the irc channel he found out some
more oddities (copied and slightly modified by courtesy of Thumper_):

#+STARTUP:
* This one works
[2011-08-28 Sun 07:07]
#+begin_src elisp
(setq org-agenda-custom-commands
      '(("h" "Agenda and home related todos"
         ((agenda ""
                  ((org-agenda-filter-preset
                    '("+home"))
                   (org-agenda-span 4)))
          (tags-todo "+home"
                     ((org-agenda-filter-preset
                       '("+home")))))
         nil)))
#+end_src
* This also incorrectly filters the first agenda
[2011-08-28 Sun 07:07]
#+begin_src elisp
(setq org-agenda-custom-commands
      '(("h" "Agenda and home related todos"
	 ((agenda ""
		   ((org-agenda-span 4)))
	  (tags-todo "+home"
		     ((org-agenda-filter-preset
		       '("+home")))))
	 nil)))
#+end_src


So, how would I set the filters properly given that I want the agenda
tob be first and a list of todo items below?

Any pointers to documentation or hints greatly appreciated :)

bye,

thomas

             reply	other threads:[~2011-08-28 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-28 11:40 Thomas Wallrafen [this message]
2011-08-29  1:53 ` org-agenda-custom-commands clarification on filters needed Eric Abrahamsen
2011-08-29 16:44   ` Thomas Wallrafen

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=20110828114011.GA26758@mail3.twallrafen.de \
    --to=lists@ranulf.de \
    --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).