emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Agenda sorting strategy
@ 2010-10-01  8:51 Sébastien Vauban
  2010-10-04 20:44 ` Jeff Horn
  2010-10-05  1:56 ` Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Sébastien Vauban @ 2010-10-01  8:51 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Here is a minimal example of problems I experience with the sorting strategy
of the agenda.

--8<---------------cut here---------------start------------->8---
* Appointments

** Technician for washing machine
   <2010-10-01 Fri>

I don't know when he will come. He'll call a couple of minutes before coming.

** TV show
   <2010-10-01 Fri 19:00-20:00>

* Task areas

** Work
   :PROPERTIES:
   :CATEGORY: Work
   :END:

*** TODO [#A] Reply to mail
    SCHEDULED: <2010-09-29 Wed>

*** TODO Work on offer
    SCHEDULED: <2010-09-30 Thu>

*** TODO Have the report ready for my boss
    DEADLINE: <2010-10-08 Fri>

** Personal
   :PROPERTIES:
   :CATEGORY: Personal
   :END:

*** TODO [#A] Call neighbor
    SCHEDULED: <2010-09-27 Mon>

*** TODO Put oil on the outside table
    SCHEDULED: <2010-09-28 Tue>

*** TODO Invite some friends
    SCHEDULED: <2010-10-01 Fri>

* Agenda sorting strategy

** Objectives

Get the tasks sorted:

- by priority ("A", "B" or "C"), then
- by "role" (category "personal" or "work"), then
- by delay

i.e.,

:   Sched:      Technician for washing machine
:                8:00-09:00 ________
:               10:00-11:00 ________
:               12:00-13:00 ________
:               14:00-15:00 ________
:               16:00-17:00 ________
:               18:00-19:00 ________
:   Sched:      19:00-20:00 TV show
:               20:00-21:00 ________
:               22:00-23:00 ________
:   Personal:   Sched. 5x:  TODO [#A] Call neighbor
:   Work:       Sched. 3x:  TODO [#A] Reply to mail
:   Personal:   Sched. 4x:  TODO Put oil on the outside table
:   Personal:   Scheduled:  TODO Invite some friends
:   Work:       Sched. 2x:  TODO Work on offer
:   Work:       In   7 d.:  TODO Have the report ready for my boss

Note that I would like (well "dated" but) "untimed" events (such as "The
technician will come today") to be just before the day overview. Would it be
just after, it's OK as well, but less visible.

:                8:00-09:00 ________
:               10:00-11:00 ________
:               12:00-13:00 ________
:               14:00-15:00 ________
:               16:00-17:00 ________
:               18:00-19:00 ________
:   Sched:      19:00-20:00 TV show
:               20:00-21:00 ________
:               22:00-23:00 ________
:   Sched:      Technician for washing machine
:   Personal:   Sched. 5x:  TODO [#A] Call neighbor
:   Work:       Sched. 3x:  TODO [#A] Reply to mail
:   Personal:   Sched. 4x:  TODO Put oil on the outside table
:   Personal:   Scheduled:  TODO Invite some friends
:   Work:       Sched. 2x:  TODO Work on offer
:   Work:       In   7 d.:  TODO Have the report ready for my boss

But, anyway, I cannot get any of these!

What is important to see as well is that all my A tasks are at the top of the
list (sorted by category: first Personal, then Work), then all my B tasks
(sorted by category: first Personal, then Work).

** Default value

#+begin_src emacs-lisp
(setq org-agenda-sorting-strategy
      '((agenda habit-down time-up priority-down category-keep)
        (todo priority-down category-keep)
        (tags priority-down category-keep)
        (search category-keep)))
#+end_src

#+results:
:                8:00-09:00 ________
:               10:00-11:00 ________
:               12:00-13:00 ________
:               14:00-15:00 ________
:               16:00-17:00 ________
:               18:00-19:00 ________
:   Sched:      19:00-20:00 TV show
:               20:00-21:00 ________
:               22:00-23:00 ________
:   Personal:   Sched. 5x:  TODO [#A] Call neighbor
:   Work:       Sched. 3x:  TODO [#A] Reply to mail
:   Personal:   Sched. 4x:  TODO Put oil on the outside table
:   Work:       Sched. 2x:  TODO Work on offer
:   Personal:   Scheduled:  TODO Invite some friends
:   Sched:      Technician for washing machine
:   Work:       In   7 d.:  TODO Have the report ready for my boss

** Custom value

#+begin_src emacs-lisp
(setq org-agenda-sorting-strategy
      '((agenda priority-down category-up time-up)
        (todo priority-down category-keep)
        (tags priority-down category-keep)
        (search category-keep)))
#+end_src

#+results:
:   Personal:   Sched. 5x:  TODO [#A] Call neighbor
:   Work:       Sched. 3x:  TODO [#A] Reply to mail
:   Personal:   Sched. 4x:  TODO Put oil on the outside table
:   Work:       Sched. 2x:  TODO Work on offer
:   Personal:   Scheduled:  TODO Invite some friends
:   Sched:      19:00-20:00 TV show
:   Sched:      Technician for washing machine
:   Work:       In   7 d.:  TODO Have the report ready for my boss
:                8:00-09:00 ________
:               10:00-11:00 ________
:               12:00-13:00 ________
:               14:00-15:00 ________
:               16:00-17:00 ________
:               18:00-19:00 ________
:               20:00-21:00 ________
:               22:00-23:00 ________

Observations:

- for equivalent priorities (B), *tasks are not sorted by category* (?):
  + Personal:   Sched. 4x:  TODO Put oil on the outside table
  + Work:       Sched. 2x:  TODO Work on offer
  + Personal:   Scheduled:  TODO Invite some friends

- day overview is at the end of the buffer (!!)
--8<---------------cut here---------------end--------------->8---

Can you help me getting what I want?

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Agenda sorting strategy
  2010-10-01  8:51 Agenda sorting strategy Sébastien Vauban
@ 2010-10-04 20:44 ` Jeff Horn
  2010-10-05  1:33   ` Carsten Dominik
  2010-10-05  1:56 ` Carsten Dominik
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff Horn @ 2010-10-04 20:44 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

2010/10/1 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>:
> Get the tasks sorted:
>
> - by priority ("A", "B" or "C"), then
> - by "role" (category "personal" or "work"), then
> - by delay

+1. I think having some customization over ordering would be very useful.

-- 
Jeffrey Horn
Graduate Lecturer and PhD Student in Economics
George Mason University

(704) 271-4797
jhorn@gmu.edu
jrhorn424@gmail.com

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

* Re: Agenda sorting strategy
  2010-10-04 20:44 ` Jeff Horn
@ 2010-10-05  1:33   ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2010-10-05  1:33 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Sébastien Vauban, emacs-orgmode


On Oct 4, 2010, at 10:44 PM, Jeff Horn wrote:

> 2010/10/1 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>:
>> Get the tasks sorted:
>>
>> - by priority ("A", "B" or "C"), then
>> - by "role" (category "personal" or "work"), then
>> - by delay
>
> +1. I think having some customization over ordering would be very  
> useful.

Well, we have, the variable is org-agenda-sorting-strategy.

- Carsten

>
> -- 
> Jeffrey Horn
> Graduate Lecturer and PhD Student in Economics
> George Mason University
>
> (704) 271-4797
> jhorn@gmu.edu
> jrhorn424@gmail.com
>
> _______________________________________________
> 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] 5+ messages in thread

* Re: Agenda sorting strategy
  2010-10-01  8:51 Agenda sorting strategy Sébastien Vauban
  2010-10-04 20:44 ` Jeff Horn
@ 2010-10-05  1:56 ` Carsten Dominik
  2010-10-05  2:14   ` Samuel Wales
  1 sibling, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2010-10-05  1:56 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode


On Oct 1, 2010, at 10:51 AM, Sébastien Vauban wrote:

> Hello,
>
> Here is a minimal example of problems I experience with the sorting  
> strategy
> of the agenda.
>
> --8<---------------cut here---------------start------------->8---
> * Appointments
>
> ** Technician for washing machine
>   <2010-10-01 Fri>
>
> I don't know when he will come. He'll call a couple of minutes  
> before coming.
>
> ** TV show
>   <2010-10-01 Fri 19:00-20:00>
>
> * Task areas
>
> ** Work
>   :PROPERTIES:
>   :CATEGORY: Work
>   :END:
>
> *** TODO [#A] Reply to mail
>    SCHEDULED: <2010-09-29 Wed>
>
> *** TODO Work on offer
>    SCHEDULED: <2010-09-30 Thu>
>
> *** TODO Have the report ready for my boss
>    DEADLINE: <2010-10-08 Fri>
>
> ** Personal
>   :PROPERTIES:
>   :CATEGORY: Personal
>   :END:
>
> *** TODO [#A] Call neighbor
>    SCHEDULED: <2010-09-27 Mon>
>
> *** TODO Put oil on the outside table
>    SCHEDULED: <2010-09-28 Tue>
>
> *** TODO Invite some friends
>    SCHEDULED: <2010-10-01 Fri>
>
> * Agenda sorting strategy
>
> ** Objectives
>
> Get the tasks sorted:
>
> - by priority ("A", "B" or "C"), then
> - by "role" (category "personal" or "work"), then
> - by delay
>
> i.e.,
>
> :   Sched:      Technician for washing machine
> :                8:00-09:00 ________
> :               10:00-11:00 ________
> :               12:00-13:00 ________
> :               14:00-15:00 ________
> :               16:00-17:00 ________
> :               18:00-19:00 ________
> :   Sched:      19:00-20:00 TV show
> :               20:00-21:00 ________
> :               22:00-23:00 ________
> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
> :   Personal:   Scheduled:  TODO Invite some friends
> :   Work:       Sched. 2x:  TODO Work on offer
> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>
> Note that I would like (well "dated" but) "untimed" events (such as  
> "The
> technician will come today") to be just before the day overview.  
> Would it be
> just after, it's OK as well, but less visible.
>
> :                8:00-09:00 ________
> :               10:00-11:00 ________
> :               12:00-13:00 ________
> :               14:00-15:00 ________
> :               16:00-17:00 ________
> :               18:00-19:00 ________
> :   Sched:      19:00-20:00 TV show
> :               20:00-21:00 ________
> :               22:00-23:00 ________
> :   Sched:      Technician for washing machine
> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
> :   Personal:   Scheduled:  TODO Invite some friends
> :   Work:       Sched. 2x:  TODO Work on offer
> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>
> But, anyway, I cannot get any of these!
>
> What is important to see as well is that all my A tasks are at the  
> top of the
> list (sorted by category: first Personal, then Work), then all my B  
> tasks
> (sorted by category: first Personal, then Work).
>
> ** Default value
>
> #+begin_src emacs-lisp
> (setq org-agenda-sorting-strategy
>      '((agenda habit-down time-up priority-down category-keep)
>        (todo priority-down category-keep)
>        (tags priority-down category-keep)
>        (search category-keep)))
> #+end_src
>
> #+results:
> :                8:00-09:00 ________
> :               10:00-11:00 ________
> :               12:00-13:00 ________
> :               14:00-15:00 ________
> :               16:00-17:00 ________
> :               18:00-19:00 ________
> :   Sched:      19:00-20:00 TV show
> :               20:00-21:00 ________
> :               22:00-23:00 ________
> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
> :   Work:       Sched. 2x:  TODO Work on offer
> :   Personal:   Scheduled:  TODO Invite some friends
> :   Sched:      Technician for washing machine
> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>
> ** Custom value
>
> #+begin_src emacs-lisp
> (setq org-agenda-sorting-strategy
>      '((agenda priority-down category-up time-up)
>        (todo priority-down category-keep)
>        (tags priority-down category-keep)
>        (search category-keep)))
> #+end_src
>
> #+results:
> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
> :   Work:       Sched. 2x:  TODO Work on offer
> :   Personal:   Scheduled:  TODO Invite some friends
> :   Sched:      19:00-20:00 TV show
> :   Sched:      Technician for washing machine
> :   Work:       In   7 d.:  TODO Have the report ready for my boss
> :                8:00-09:00 ________
> :               10:00-11:00 ________
> :               12:00-13:00 ________
> :               14:00-15:00 ________
> :               16:00-17:00 ________
> :               18:00-19:00 ________
> :               20:00-21:00 ________
> :               22:00-23:00 ________
>
> Observations:
>
> - for equivalent priorities (B), *tasks are not sorted by category*  
> (?):
>  + Personal:   Sched. 4x:  TODO Put oil on the outside table
>  + Work:       Sched. 2x:  TODO Work on offer
>  + Personal:   Scheduled:  TODO Invite some friends

The reason for this is that the priority has several components.
The specified priority #B (even if omitted) is one component.
But since "Work on offer" was already scheduled yesterday,
its priority is pushed up.  You can see the computed priority
by pressing "P" on items in the agenda.


>
> - day overview is at the end of the buffer (!!)


To get this right, you need time-up early in the strategy.

> --8<---------------cut here---------------end--------------->8---
>
> Can you help me getting what I want?

Hope this at least helps to understand what is going on.

I guess we could have a variable to make priority only
consider the priority cookies and not the urgency depending
on deadlines and scheduling dates.  Or make the priority formula
configurable.  But neither of these is currently implemented, so
changing this would require some code to be written.

- Carsten

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

* Re: Agenda sorting strategy
  2010-10-05  1:56 ` Carsten Dominik
@ 2010-10-05  2:14   ` Samuel Wales
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Wales @ 2010-10-05  2:14 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Sébastien Vauban, emacs-orgmode

org-agenda-cmp-user-defined + org-entry-get = solution.

On 2010-10-04, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> On Oct 1, 2010, at 10:51 AM, Sébastien Vauban wrote:
>
>> Hello,
>>
>> Here is a minimal example of problems I experience with the sorting
>> strategy
>> of the agenda.
>>
>> --8<---------------cut here---------------start------------->8---
>> * Appointments
>>
>> ** Technician for washing machine
>>   <2010-10-01 Fri>
>>
>> I don't know when he will come. He'll call a couple of minutes
>> before coming.
>>
>> ** TV show
>>   <2010-10-01 Fri 19:00-20:00>
>>
>> * Task areas
>>
>> ** Work
>>   :PROPERTIES:
>>   :CATEGORY: Work
>>   :END:
>>
>> *** TODO [#A] Reply to mail
>>    SCHEDULED: <2010-09-29 Wed>
>>
>> *** TODO Work on offer
>>    SCHEDULED: <2010-09-30 Thu>
>>
>> *** TODO Have the report ready for my boss
>>    DEADLINE: <2010-10-08 Fri>
>>
>> ** Personal
>>   :PROPERTIES:
>>   :CATEGORY: Personal
>>   :END:
>>
>> *** TODO [#A] Call neighbor
>>    SCHEDULED: <2010-09-27 Mon>
>>
>> *** TODO Put oil on the outside table
>>    SCHEDULED: <2010-09-28 Tue>
>>
>> *** TODO Invite some friends
>>    SCHEDULED: <2010-10-01 Fri>
>>
>> * Agenda sorting strategy
>>
>> ** Objectives
>>
>> Get the tasks sorted:
>>
>> - by priority ("A", "B" or "C"), then
>> - by "role" (category "personal" or "work"), then
>> - by delay
>>
>> i.e.,
>>
>> :   Sched:      Technician for washing machine
>> :                8:00-09:00 ________
>> :               10:00-11:00 ________
>> :               12:00-13:00 ________
>> :               14:00-15:00 ________
>> :               16:00-17:00 ________
>> :               18:00-19:00 ________
>> :   Sched:      19:00-20:00 TV show
>> :               20:00-21:00 ________
>> :               22:00-23:00 ________
>> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
>> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
>> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
>> :   Personal:   Scheduled:  TODO Invite some friends
>> :   Work:       Sched. 2x:  TODO Work on offer
>> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>>
>> Note that I would like (well "dated" but) "untimed" events (such as
>> "The
>> technician will come today") to be just before the day overview.
>> Would it be
>> just after, it's OK as well, but less visible.
>>
>> :                8:00-09:00 ________
>> :               10:00-11:00 ________
>> :               12:00-13:00 ________
>> :               14:00-15:00 ________
>> :               16:00-17:00 ________
>> :               18:00-19:00 ________
>> :   Sched:      19:00-20:00 TV show
>> :               20:00-21:00 ________
>> :               22:00-23:00 ________
>> :   Sched:      Technician for washing machine
>> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
>> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
>> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
>> :   Personal:   Scheduled:  TODO Invite some friends
>> :   Work:       Sched. 2x:  TODO Work on offer
>> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>>
>> But, anyway, I cannot get any of these!
>>
>> What is important to see as well is that all my A tasks are at the
>> top of the
>> list (sorted by category: first Personal, then Work), then all my B
>> tasks
>> (sorted by category: first Personal, then Work).
>>
>> ** Default value
>>
>> #+begin_src emacs-lisp
>> (setq org-agenda-sorting-strategy
>>      '((agenda habit-down time-up priority-down category-keep)
>>        (todo priority-down category-keep)
>>        (tags priority-down category-keep)
>>        (search category-keep)))
>> #+end_src
>>
>> #+results:
>> :                8:00-09:00 ________
>> :               10:00-11:00 ________
>> :               12:00-13:00 ________
>> :               14:00-15:00 ________
>> :               16:00-17:00 ________
>> :               18:00-19:00 ________
>> :   Sched:      19:00-20:00 TV show
>> :               20:00-21:00 ________
>> :               22:00-23:00 ________
>> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
>> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
>> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
>> :   Work:       Sched. 2x:  TODO Work on offer
>> :   Personal:   Scheduled:  TODO Invite some friends
>> :   Sched:      Technician for washing machine
>> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>>
>> ** Custom value
>>
>> #+begin_src emacs-lisp
>> (setq org-agenda-sorting-strategy
>>      '((agenda priority-down category-up time-up)
>>        (todo priority-down category-keep)
>>        (tags priority-down category-keep)
>>        (search category-keep)))
>> #+end_src
>>
>> #+results:
>> :   Personal:   Sched. 5x:  TODO [#A] Call neighbor
>> :   Work:       Sched. 3x:  TODO [#A] Reply to mail
>> :   Personal:   Sched. 4x:  TODO Put oil on the outside table
>> :   Work:       Sched. 2x:  TODO Work on offer
>> :   Personal:   Scheduled:  TODO Invite some friends
>> :   Sched:      19:00-20:00 TV show
>> :   Sched:      Technician for washing machine
>> :   Work:       In   7 d.:  TODO Have the report ready for my boss
>> :                8:00-09:00 ________
>> :               10:00-11:00 ________
>> :               12:00-13:00 ________
>> :               14:00-15:00 ________
>> :               16:00-17:00 ________
>> :               18:00-19:00 ________
>> :               20:00-21:00 ________
>> :               22:00-23:00 ________
>>
>> Observations:
>>
>> - for equivalent priorities (B), *tasks are not sorted by category*
>> (?):
>>  + Personal:   Sched. 4x:  TODO Put oil on the outside table
>>  + Work:       Sched. 2x:  TODO Work on offer
>>  + Personal:   Scheduled:  TODO Invite some friends
>
> The reason for this is that the priority has several components.
> The specified priority #B (even if omitted) is one component.
> But since "Work on offer" was already scheduled yesterday,
> its priority is pushed up.  You can see the computed priority
> by pressing "P" on items in the agenda.
>
>
>>
>> - day overview is at the end of the buffer (!!)
>
>
> To get this right, you need time-up early in the strategy.
>
>> --8<---------------cut here---------------end--------------->8---
>>
>> Can you help me getting what I want?
>
> Hope this at least helps to understand what is going on.
>
> I guess we could have a variable to make priority only
> consider the priority cookies and not the urgency depending
> on deadlines and scheduling dates.  Or make the priority formula
> configurable.  But neither of these is currently implemented, so
> changing this would require some code to be written.
>
> - Carsten
>
>
> _______________________________________________
> 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
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly serious
disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE
===
I would like to see the original Lo et al. 2010 NIH/FDA XMRV paper.

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

end of thread, other threads:[~2010-10-05  2:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-01  8:51 Agenda sorting strategy Sébastien Vauban
2010-10-04 20:44 ` Jeff Horn
2010-10-05  1:33   ` Carsten Dominik
2010-10-05  1:56 ` Carsten Dominik
2010-10-05  2:14   ` Samuel Wales

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).