[Top][All Lists]

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

Re: [Orgmode] in-buffer settings for priorities

From: Carsten Dominik
Subject: Re: [Orgmode] in-buffer settings for priorities
Date: Sun, 20 May 2007 17:45:08 +0200

Hi Dmitri,

before I look deeper into your patch, please try the
following and tell us if this does the trick:

On May 16, 2007, at 11:43, Dmitri Minaev wrote:


I'd like to know the opinion of the community (and Carsten's in
particular, of course) on the following idea -- do you think it would
be useful to have in-buffer settings to customize priorities?

The background story (sorry if it's verbose) is like this. I keep my
reading list in org-mode (quite naturally). Normally, the entries are
stored in the chronological order, but sometimes I would like to see
the best or the worst read books. I started by using tags like
:score2:, :score8:, etc., so I could search for tags using regexps
like {score[7-9]}. Unfortunately, the entries were not sorted.

You can influence the sorting strategy,  The following should work:

(setq org-agenda-custom-commands
      '(("P" tags "{^score[0-9]}"
         ((org-agenda-files '("~/org/books.org"))
          (org-agenda-sorting-strategy '(tag-down))
          (org-agenda-prefix-format "  %T: ")))))

This sets up the command `C-c a P' to select books with a
score tag, and to sort the list by score.
The parameters make sure that only the file
~/org/books.org is checked, set up the sorting strategy
to only look at the tag, and change the prefix to only
show the score tag.

The one complication/limitation is that the setup above
will require that the score tag is the last tag in the
list of tags, because only that tag will be used for
sorting.  A good way to do this is to make the score
tags the last in your tags setup, for example:

#+TAGS: xxx yyy zzz
#+TAGS: { score0(0) score1(1) score2(2) score3(3) score4(4)
#+TAGS:   score5(5) score6(6) score7(7) score8(8) score9(9) }

As you see, the score tags are set up as mutually exclusive
(they are grouped in {...}), and all other tags are listed
before them.  So after changing tags with C-c C-c, tags
will always be sorted to have the score last.

- Carsten

reply via email to

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