From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: in-buffer settings for priorities Date: Tue, 22 May 2007 06:57:52 +0200 Message-ID: <97a7c0ad66b386ae5b4f37d9a538ef14@science.uva.nl> References: Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HqMRb-0000gP-MW for emacs-orgmode@gnu.org; Tue, 22 May 2007 00:57:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HqMRZ-0000gD-3K for emacs-orgmode@gnu.org; Tue, 22 May 2007 00:57:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqMRY-0000gA-U2 for emacs-orgmode@gnu.org; Tue, 22 May 2007 00:57:56 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HqMRY-0004P3-Dc for emacs-orgmode@gnu.org; Tue, 22 May 2007 00:57:56 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dmitri Minaev Cc: emacs-orgmode@gnu.org Actually, lets just take your patch, it is useful. One change: The in-buffer setting will be #+PRIORITIES: highest lowest default for example #+PRIORITIES: A C B or #+PRIORITIES: 1 9 9 Thanks! - Carsten On May 21, 2007, at 15:11, Dmitri Minaev wrote: > 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 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 > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > -- Carsten Dominik Sterrenkundig Instituut "Anton Pannekoek" Universiteit van Amsterdam Kruislaan 403 NL-1098SJ Amsterdam phone: +31 20 525 7477