emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: sorting tasks in planner


From: Sacha Chua
Subject: [emacs-wiki-discuss] Re: sorting tasks in planner
Date: Fri, 05 Aug 2005 08:58:57 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

address@hidden (J. David Boyd) writes:

> I'd actually like them to sort by priority, and then alphabetically.  I group
> things together under priorities, with leading descriptors like 'build',

(defun david/planner-sort-tasks-key ()
 "Sort by priority, and then alphabetically."
 (let ((info (planner-current-task-info)))
  (concat
   (planner-task-priority info)
   (cond
    ((string= (planner-task-status info) "o") "1")
    ((string= (planner-task-status info) "X") "3")
    ((string= (planner-task-status info) "C") "4")
    (t "2"))
   (planner-task-description info))))
(setq planner-sort-tasks-key-function 'david/planner-sort-tasks-key)

> 'test', 'research', and I would like these 'sub-headings' to be grouped
> together within a priority block.

You might also be interested in planner-trunk, which will add empty lines 
between subheadings. =)

If you want to modify this further, Emacs Lisp is pretty easy to read
and pick up... <grin> Have fun!

-- 
Sacha Chua <address@hidden> - open source geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, juggling
sachac on irc.freenode.net#emacs . YM: sachachua83




reply via email to

[Prev in Thread] Current Thread [Next in Thread]