emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "François Allisson" <francois@allisson.co>
To: Renger van Nieuwkoop <renger@vannieuwkoop.ch>
Cc: Org mode <emacs-orgmode@gnu.org>
Subject: Re: Problems with habit sorting
Date: Mon, 8 Oct 2012 18:28:40 +0200	[thread overview]
Message-ID: <20121008162840.GA23885@debian> (raw)
In-Reply-To: <5E17CCD4AACE3A4C8CFF411186AE819024E7D2CC@EXDAG30-N2.hostallapps.net>

Le lundi 08 oct 2012 à 15:32:27 (+0000), Renger van Nieuwkoop a écrit :
> Hi
> I have an agenda-view where I can see all my habits. They have priorities but
> are not sorted.
> Any idea how to sort them according to priority.

Hi Renger,

You should probably customise the variable org-agenda-sorting-strategy,
with the symbol priority-down, i.e. by adding this line to the
definition of your custom agenda-view:

  (org-agenda-sorting-strategy '(priority-down todo-state-up tag-up))

You can then fine-tuning inside priorities, according to your needs
(here, todo-state-up and tag-up for an example). See the docstring for
org-agenda-sorting-strategy:

***************************************
* org-agenda-sorting-strategy is a variable defined in `org-agenda.el'.
* Its value is ((agenda habit-down time-up priority-down category-keep)
*  (todo priority-down category-keep)
*  (tags priority-down category-keep)
*  (search category-keep))
* 
* 
* Documentation:
* Sorting structure for the agenda items of a single day.
* This is a list of symbols which will be used in sequence to determine
* if an entry should be listed before another entry.  The following
* symbols are recognized:
* 
* time-up            Put entries with time-of-day indications first, early first
* time-down          Put entries with time-of-day indications first, late first
* category-keep      Keep the default order of categories, corresponding to the
* 		   sequence in `org-agenda-files'.
* category-up        Sort alphabetically by category, A-Z.
* category-down      Sort alphabetically by category, Z-A.
* tag-up             Sort alphabetically by last tag, A-Z.
* tag-down           Sort alphabetically by last tag, Z-A.
* priority-up        Sort numerically by priority, high priority last.
* priority-down      Sort numerically by priority, high priority first.
* todo-state-up      Sort by todo state, tasks that are done last.
* todo-state-down    Sort by todo state, tasks that are done first.
* effort-up          Sort numerically by estimated effort, high effort last.
* effort-down        Sort numerically by estimated effort, high effort first.
* user-defined-up    Sort according to `org-agenda-cmp-user-defined', high last.
* user-defined-down  Sort according to `org-agenda-cmp-user-defined', high first.
* habit-up           Put entries that are habits first
* habit-down         Put entries that are habits last
* alpha-up           Sort headlines alphabetically
* alpha-down         Sort headlines alphabetically, reversed
* 
* The different possibilities will be tried in sequence, and testing stops
* if one comparison returns a "not-equal".  For example, the default
*     '(time-up category-keep priority-down)
* means: Pull out all entries having a specified time of day and sort them,
* in order to make a time schedule for the current day the first thing in the
* agenda listing for the day.  Of the entries without a time indication, keep
* the grouped in categories, don't sort the categories, but keep them in
* the sequence given in `org-agenda-files'.  Within each category sort by
* priority.
* 
* Leaving out `category-keep' would mean that items will be sorted across
* categories by priority.
* 
* Instead of a single list, this can also be a set of list for specific
* contents, with a context symbol in the car of the list, any of
* `agenda', `todo', `tags', `search' for the corresponding agenda views.
* 
* Custom commands can bind this variable in the options section.
* 
* You can customize this variable.
**************************

HTH,

François.

      reply	other threads:[~2012-10-08 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 15:32 Problems with habit sorting Renger van Nieuwkoop
2012-10-08 16:28 ` François Allisson [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=20121008162840.GA23885@debian \
    --to=francois@allisson.co \
    --cc=emacs-orgmode@gnu.org \
    --cc=renger@vannieuwkoop.ch \
    /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).