emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] in-buffer settings for priorities


From: Dmitri Minaev
Subject: Re: [Orgmode] in-buffer settings for priorities
Date: Mon, 21 May 2007 18:11:15 +0500

copying to the list:

Thank you. I thought about using sorting strategy to sort by tags, but
the requirement that the score must be the last tag has stopped me. I
like the approach you describe, but it still has some deficiencies.
First, any tag not included in the set of the pre-defined tags breaks
the order of tags making the score to appear before this tag. Second,
I would say that it's more visually pleasing to have the rating in a
fixed place, separate from tags. The idea of priorities itself fits
the task better, IMHO.

BTW, after upgrade to 4.74, I noticed a couple of things:

1. When the state of an item changes from nothing to the first in the
TODO sequence, no note is taken and the state change is not logged. Is
this by design?

2. When I run org-tags-sparse-tree with a regexp like {score[X-Y]},
the resulting tree includes one and only one item with the score less
than X. I simplified the tree and .emacs as much as possible and even
the example as simple as the one below still demonstrates this
behaviour:

* qwer
** qwer                                         :score9:
** asdf                                         :score7:
** zxcv                                         :score5:
** nmkj                                         :score7:
** poi                                          :score4:

C-c \ {[score[8-9]} gives the result:
* qwer
** qwer                                         :score9:
** asdf                                         :score7:...

On 5/20/07, Carsten Dominik <address@hidden> wrote:
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:

> Hello,
>
> 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




--
With best regards,
Dmitri Minaev

Russian history blog: http://minaev.blogspot.com




reply via email to

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