emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Sorting Agenda By Priority
@ 2011-10-07 11:07 Richard Parsons
  2011-10-07 11:26 ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Parsons @ 2011-10-07 11:07 UTC (permalink / raw)
  To: emacs-orgmode

Hi all

I want to sort the agenda file so that the tasks marked with
priorities A, B and C are all at the top, with tasks marked with no
priority underneath.

I've tried reading the manual on this
(http://orgmode.org/manual/Sorting-of-agenda-items.html#Sorting-of-agenda-items),
but don't understand it.  I'm guessing that I have to change the
variable org-agenda-sorting-strategy somehow, but I'm not sure what
to.

Thanks for helping a new user!

Richard

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

* Re: Sorting Agenda By Priority
  2011-10-07 11:07 Sorting Agenda By Priority Richard Parsons
@ 2011-10-07 11:26 ` Bernt Hansen
  2011-10-07 11:34   ` Richard Parsons
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2011-10-07 11:26 UTC (permalink / raw)
  To: Richard Parsons; +Cc: emacs-orgmode

Richard Parsons <richard.lee.parsons@gmail.com> writes:

> Hi all
>
> I want to sort the agenda file so that the tasks marked with
> priorities A, B and C are all at the top, with tasks marked with no
> priority underneath.
>
> I've tried reading the manual on this
> (http://orgmode.org/manual/Sorting-of-agenda-items.html#Sorting-of-agenda-items),
> but don't understand it.  I'm guessing that I have to change the
> variable org-agenda-sorting-strategy somehow, but I'm not sure what
> to.
>
> Thanks for helping a new user!

Hi Richard,

Welcome to the org-mode community!

What you describe should be the default behaviour.  But items with no
priority default to B so you need to drop the default priority below the
items you normally set a priority for (ie D if A, B, and C are the only
priorities you use).

See org-default-priority, org-lowest-priority

,----[ example org file ]
| * TODO [#C] Priority C task
| * TODO [#B] Priority B task
| * TODO [#A] High priority task
| * TODO Some other task
| 
| (setq org-default-priority ?D)
| (setq org-lowest-priority ?F)
| 
`----

Result from M-x org-agenda < t

,----
| -UUU:**--F1  foo.org        All L8     (Org)------------------------------------------------------------
| Global list of TODO items of type: ALL
| Available with `N r': (0)ALL (1)TODO (2)DONE
|   foo:        TODO [#A] High priority task
|   foo:        TODO [#B] Priority B task
|   foo:        TODO [#C] Priority C task
|   foo:        TODO Some other task
`----

HTH,
Bernt

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

* Re: Sorting Agenda By Priority
  2011-10-07 11:26 ` Bernt Hansen
@ 2011-10-07 11:34   ` Richard Parsons
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Parsons @ 2011-10-07 11:34 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

On Fri, Oct 7, 2011 at 12:26 PM, Bernt Hansen <bernt@norang.ca> wrote:
> Richard Parsons <richard.lee.parsons@gmail.com> writes:
>
>> Hi all
>>
>> I want to sort the agenda file so that the tasks marked with
>> priorities A, B and C are all at the top, with tasks marked with no
>> priority underneath.
>>
>> I've tried reading the manual on this
>> (http://orgmode.org/manual/Sorting-of-agenda-items.html#Sorting-of-agenda-items),
>> but don't understand it.  I'm guessing that I have to change the
>> variable org-agenda-sorting-strategy somehow, but I'm not sure what
>> to.
>>
>> Thanks for helping a new user!

> Welcome to the org-mode community!

Thank you very much.  It's a great community and I continue to be very
impressed.

> What you describe should be the default behaviour.  But items with no
> priority default to B so you need to drop the default priority below the
> items you normally set a priority for (ie D if A, B, and C are the only
> priorities you use).

Ah, so I was barking up the wrong tree.

> See org-default-priority, org-lowest-priority
>
> ,----[ example org file ]
> | * TODO [#C] Priority C task
> | * TODO [#B] Priority B task
> | * TODO [#A] High priority task
> | * TODO Some other task
> |
> | (setq org-default-priority ?D)
> | (setq org-lowest-priority ?F)

That worked perfectly.  Thanks!

Richard

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

end of thread, other threads:[~2011-10-07 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-07 11:07 Sorting Agenda By Priority Richard Parsons
2011-10-07 11:26 ` Bernt Hansen
2011-10-07 11:34   ` Richard Parsons

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