emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Dmitri Minaev" <minaev@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: in-buffer settings for priorities
Date: Mon, 21 May 2007 18:11:15 +0500	[thread overview]
Message-ID: <b6c377310705210611i12f4f62n64733d5faba06835@mail.gmail.com> (raw)
In-Reply-To: <e0d45c0e020cc715f1b5d8fd439b7c61@science.uva.nl>

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 <dominik@science.uva.nl> 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	other threads:[~2007-05-21 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16  9:43 in-buffer settings for priorities Dmitri Minaev
2007-05-16 11:47 ` Dmitri Minaev
2007-05-20 15:45 ` Carsten Dominik
2007-05-21 13:11   ` Dmitri Minaev [this message]
2007-05-21 14:35     ` Carsten Dominik
2007-05-22  8:07       ` Dmitri Minaev
2007-05-29 15:27         ` Carsten Dominik
2007-05-22  4:57     ` Carsten Dominik

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=b6c377310705210611i12f4f62n64733d5faba06835@mail.gmail.com \
    --to=minaev@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).