emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Barton <abubious@gmail.com>
To: Matt Lundin <mdl@imapmail.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Custom agenda view - filter by priority AND scheduled date
Date: Wed, 28 Apr 2010 20:30:10 +0300	[thread overview]
Message-ID: <8A1E5519-5AC6-422B-B2E6-00F7B97CBCBB@gmail.com> (raw)
In-Reply-To: <878w871olt.fsf@fastmail.fm>

Thanks Matt, works like a charm! 

The final version of my org-agenda-custom-commands:

(setq org-agenda-custom-commands
      '(("c" . "Priority views")
	("ca" "#A" agenda ""
	 ((org-agenda-entry-types '(:scheduled))
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "\\[#A\\]"))))
	("cb" "#B" agenda ""
	 ((org-agenda-entry-types '(:scheduled))
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "\\[#B\\]"))))
	("cc" "#C" agenda ""
	 ((org-agenda-entry-types '(:scheduled))
	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "\\[#C\\]"))))
	;; ...other commands here
	))

The org-mode love affair goes on. =)

Barton

On Apr 28, 2010, at 20:19 , Matt Lundin wrote:

> Barton <abubious@gmail.com> writes:
> 
>> In my workflow, I move by priorities and scheduled dates for the tasks.
>> My goal with this issue is to have a view that would show me only the
>> tasks with certain priority(-ies) that are scheduled for today (or are
>> overdue, as in  (org-agenda-repeating-timestamp-show-all t) ).
>> 
>> My feeble attempt here:
>> 
>> (setq org-agenda-custom-commands
>>      '(("c" "Custom"
>>         ((agenda "" ((org-agenda-ndays 1))) 
>>          (tags-todo "+PRIORITY=\"A\"")))
>> ;; ...other commands here
>>        ))
>> 
>> ... displays a usual daily agenda and following it, _all_ the #A tasks
>> that I have. Clearly not what has been intended.
> 
> Here's one way to do it:
> 
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-custom-commands
>      '(("c" "Custom" tags-todo "+SCHEDULED<=\"<today>\"+PRIORITY=\"A\"")
> ;; ...other commands here
>        ))
> --8<---------------cut here---------------end--------------->8---
> 
> Another approach is to use the daily agenda view and a skip function.
> This is a bit faster than the first example:
> 
> --8<---------------cut here---------------start------------->8---
> (setq org-agenda-custom-commands
>      '(("c" "Custom" agenda ""
> 	 ((org-agenda-entry-types '(:scheduled))
> 	  (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "\\[#A\\]"))))
> ;; ...other commands here
>        ))
> --8<---------------cut here---------------end--------------->8---
> 
> HTH,
> Matt

      reply	other threads:[~2010-04-28 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 13:36 Custom agenda view - filter by priority AND scheduled date Barton
2010-04-28 17:19 ` Matt Lundin
2010-04-28 17:30   ` Barton [this message]

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=8A1E5519-5AC6-422B-B2E6-00F7B97CBCBB@gmail.com \
    --to=abubious@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mdl@imapmail.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).