emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Detlef Steuer <detlef.steuer@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Sort order of TODO entries
Date: Thu, 08 Mar 2012 09:52:40 -0600	[thread overview]
Message-ID: <87linbnl87.fsf@fastmail.fm> (raw)
In-Reply-To: <20120308155637.42844cf7@vknecht-intel.unibw-hamburg.de> (Detlef Steuer's message of "Thu, 8 Mar 2012 15:56:37 +0100")

Hi Detlef,

Detlef Steuer <detlef.steuer@gmx.de> writes:

> I don't understand the reasoning in putting TODOs without priority or
> WAITING without priority before priority #C. 
>
> Conceptually "no priority" (for me) means "not decided how important or
> not important at all, but would like to work on it", In contrast "#C"
> means "must be done, but do #A and #B first". 
>
> It would IMHO feel much more natural to sort
>
> #A, #B, #C, no priority.

Currently, org gives items with no priority a default priority of B.

,----[ (info "(org) Priorities")
| By default, Org mode supports three priorities: `A', `B', and `C'.  `A'
| is the highest priority.  An entry without a cookie is treated just
| like priority `B'.  Priorities make a difference only for sorting in
| the agenda (*note Weekly/daily agenda::); outside the agenda, they have
| no inherent meaning to Org mode.
`----

> Is that (easily) possible?

You can modify how the agenda sorts priorities with a custom function.
Here's a quick hack that seems to work:

(defun my-org-get-priority ()
  (save-match-data
    (if (not (string-match org-priority-regexp s))
	-1000
      (* 1000 (- org-lowest-priority 
		 (string-to-char (match-string 2 s)))))))

(setq org-get-priority-function 'my-org-get-priority)

Best,
Matt

      parent reply	other threads:[~2012-03-08 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 14:56 Sort order of TODO entries Detlef Steuer
2012-03-08 15:52 ` Bernt Hansen
2012-03-08 18:14   ` Detlef Steuer
2012-03-08 15:52 ` Matt Lundin [this message]

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=87linbnl87.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=detlef.steuer@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /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).