all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Custom agenda view - filter by priority AND scheduled date
@ 2010-04-28 13:36 Barton
  2010-04-28 17:19 ` Matt Lundin
  0 siblings, 1 reply; 3+ messages in thread
From: Barton @ 2010-04-28 13:36 UTC (permalink / raw)
  To: emacs-orgmode


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

	Greetings org-mode,

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.

After wrapping my head around it, I suspect that the only way to achieve the desired functionality is through using/modifying org-agenda.el functions to have a filter, similar to that in 'C-c a a' view for tags ("/" - Tab), only this time for priorities.

Is this the best way to do this and how would one go about it? Perhaps there exists a better way to achieve the same functionality?


Will be grateful for any assistance,
Barton

[-- Attachment #1.2: Type: text/html, Size: 1945 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Custom agenda view - filter by priority AND scheduled date
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Lundin @ 2010-04-28 17:19 UTC (permalink / raw)
  To: Barton; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Custom agenda view - filter by priority AND scheduled date
  2010-04-28 17:19 ` Matt Lundin
@ 2010-04-28 17:30   ` Barton
  0 siblings, 0 replies; 3+ messages in thread
From: Barton @ 2010-04-28 17:30 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-28 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.