Next: , Previous: More about Notes, Up: More about Planner


6.6 Making Files Pretty

By default, planner does a little bit of fancy reformatting when you save a file. Tasks are sorted by priority (ABC) and status (_oP>XC) on day pages. On plan pages, tasks are sorted by priority (ABC), status (XC), and date. Undated tasks are sorted after dated tasks.

Options

— User Option: planner-sort-tasks-key-function

Control task sorting. Some options include planner-sort-tasks-default-key, planner-sort-tasks-basic, planner-sort-tasks-by-date, and planner-sort-tasks-by-link.

— User Option: planner-sort-undated-tasks-equivalent

This option controls the behavior of task sorting on plan pages. By default, the value ‘9999.99.99’ causes dated tasks to be listed before undated tasks. To sort undated tasks before dated tasks, set this to a blank string.

— User Option: planner-sort-tasks-automatically

Non-nil means sort tasks whenever a planner file is saved. On day pages, tasks are sorted by status. On plan pages, they are sorted by status and date. Sorting can take a while.

— User Option: planner-renumber-tasks-automatically

Non-nil means renumber tasks from 1 to N whenever a planner file is saved. This allows you to refer to tasks in previous day pages using anchors like ‘2003.08.12#A1’. If you use this function, make sure planner-use-task-numbers is non-nil so that new tasks are created with task numbers.

— User Option: planner-align-tasks-automatically

Non-nil means align tasks whenever a planner file is saved. This causes the status to line up in a neat column if you have less than 100 tasks.

— User Option: planner-renumber-notes-automatically

Non-nil means renumber the notes. If most of your notes are only on one page, you might like seeing the notes renumbered if you delete a note in the middle. However, if you use a lot of cross-referencing, note renumbering will break those links.

Functions

— Function: planner-sort-tasks

Sort tasks according to planner-sort-tasks-key-function. By default, sort tasks according to priority and position on day pages, and according to status, priority, date, and position on plan pages.

— Function: planner-renumber-tasks

Update task numbering.

— Function: planner-align-tasks

Align tasks neatly. You can add this to write-file-functions to have the tasks automatically lined up whenever you save. For best results, ensure planner-align-tasks is run after planner-renumber-tasks.

— Function: planner-fix-tasks

Sort, renumber and align tasks.