emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Custom agenda view - filter by priority AND scheduled date


From: Barton
Subject: [Orgmode] Re: Custom agenda view - filter by priority AND scheduled date
Date: Wed, 28 Apr 2010 20:30:10 +0300

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 <address@hidden> 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 via email to

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