emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Richard Parsons <richard.lee.parsons@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Sorting Agenda By Priority
Date: Fri, 07 Oct 2011 07:26:56 -0400	[thread overview]
Message-ID: <877h4hf3en.fsf@norang.ca> (raw)
In-Reply-To: <CAB+=1LGb3FU_avPa=31-eO+487fzn5VitOfr+OVoP=1PW7YAUg@mail.gmail.com> (Richard Parsons's message of "Fri, 7 Oct 2011 12:07:45 +0100")

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

  reply	other threads:[~2011-10-07 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 11:07 Sorting Agenda By Priority Richard Parsons
2011-10-07 11:26 ` Bernt Hansen [this message]
2011-10-07 11:34   ` Richard Parsons

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=877h4hf3en.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=richard.lee.parsons@gmail.com \
    /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).