emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* proposal for enhanced org-get-priority function
@ 2010-10-20 17:14 I.S.
  2010-10-24 19:18 ` David Maus
  0 siblings, 1 reply; 15+ messages in thread
From: I.S. @ 2010-10-20 17:14 UTC (permalink / raw)
  To: emacs-orgmode

Dear Experts,

I'd like to propose a replacement for the org-get-priority function 
which is backward compatible with the current version but allows the 
user to add a sub-priority such as [#A]-5 or [#B]+3:

(defun org-get-priority (s)
   "Find priority cookie and return priority.

Priorities of the form [#<letter>]-<number> or
[#<letter>]+<number> are supported with +/-<number> being
optional and modifying the letter priority. The letter priority
is multiplied by 100000 and then the number priority is added
on. Thus a priority string of [#B]+5 is higher than [#B] which is
higher than [#B]-2 and all are lower than [#A].

The number sub-priorities allow finer control of sorting in org agendas.
"
   (save-match-data
     (let* ((priority-match (string-match org-priority-regexp s))
        (priority-value (if priority-match
                    (* 100000 (- org-lowest-priority
                       (string-to-char (match-string 2 s))))
                  (* 100000 (- org-lowest-priority
                     org-default-priority))))
        (sub-priority-match (match-string 3 s))
        (sub-priority-value (if sub-priority-match
                    (string-to-number sub-priority-match) 0)))
       (+ priority-value sub-priority-value))))

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-10-20 17:14 proposal for enhanced org-get-priority function I.S.
@ 2010-10-24 19:18 ` David Maus
  2010-10-24 20:05   ` George Pearson
  2010-10-27 12:01   ` I.S.
  0 siblings, 2 replies; 15+ messages in thread
From: David Maus @ 2010-10-24 19:18 UTC (permalink / raw)
  To: I.S.; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 605 bytes --]

At Wed, 20 Oct 2010 13:14:39 -0400,
I.S. wrote:
>
> Dear Experts,
>
> I'd like to propose a replacement for the org-get-priority function
> which is backward compatible with the current version but allows the
> user to add a sub-priority such as [#A]-5 or [#B]+3:
>

Could you provide a patch against current master and send it to the
list as a text/plain attachment?  This way the proposed modification
will end up in Org's patchtracker[1].

Best,
  -- David

[1] http://patchwork.newartisans.com/project/org-mode/
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-10-24 19:18 ` David Maus
@ 2010-10-24 20:05   ` George Pearson
  2010-10-27 12:01   ` I.S.
  1 sibling, 0 replies; 15+ messages in thread
From: George Pearson @ 2010-10-24 20:05 UTC (permalink / raw)
  To: emacs-orgmode

At Wed, 20 Oct 2010 13:14:39 -0400,
I.S. wrote:

> Priorities of the form [#<letter>]-<number> or [#<letter>]+<number>
> are supported with +/-<number> being optional and modifying the
> letter priority. The letter priority is multiplied by 100000 and
> then the number priority is added on. Thus a priority string of
> [#B]+5 is higher than [#B] which is higher than [#B]-2 and all are
> lower than [#A]. 

> The number sub-priorities allow finer control of sorting in org
> agendas. 

This *could* help with what I would like to see.  Every day I would
like to arrange my agenda tasks for the day in the order that I would
like to do them.  (Setting fake times-of-day for each is somewhat
time consuming; I am now experimenting with an A-Z priority range.
The real-world priority of my tasks is basically all the same, so
I thought I could commandeer the priority setting to get sequencing.)

If easy to set, the sub-priority could be helpful in my sequencing 
goal.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-10-24 19:18 ` David Maus
  2010-10-24 20:05   ` George Pearson
@ 2010-10-27 12:01   ` I.S.
  2010-10-29 11:45     ` I.S.
  1 sibling, 1 reply; 15+ messages in thread
From: I.S. @ 2010-10-27 12:01 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]

On 10/24/2010 3:18 PM, David Maus wrote:
> At Wed, 20 Oct 2010 13:14:39 -0400,
> I.S. wrote:
>> Dear Experts,
>>
>> I'd like to propose a replacement for the org-get-priority function
>> which is backward compatible with the current version but allows the
>> user to add a sub-priority such as [#A]-5 or [#B]+3:
>>
> Could you provide a patch against current master and send it to the
> list as a text/plain attachment?  This way the proposed modification
> will end up in Org's patchtracker[1].
>
> Best,
>    -- David
>
> [1] http://patchwork.newartisans.com/project/org-mode/
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de

I tried looing at patchwork but couldn't figure out what I was supposed 
to do. Please advise on usage instructions.

Instead, I attached a manually generated patch against org.el in the 
development version from git. I created this patch via

$ git clone git://repo.or.cz/org-mode.git
$ emacs org-mode/lisp/org.el # to modify the file and write it to 
org.mine.el
$ diff -rup org.el org.mine.el > org-get-priority.patch

Please advise on proper procedure as I love org and would enjoy the 
chance to contribute in the future.

Thanks,
-I.S.


[-- Attachment #2: org-get-priority.patch --]
[-- Type: text/plain, Size: 1465 bytes --]

emin@martinian.com's password: 
--- org.el	2010-10-27 07:47:50.702497227 -0400
+++ org.mine.el	2010-10-27 07:48:59.090619203 -0400
@@ -12211,13 +12211,27 @@ ACTION can be `set', `up', `down', or a 
       (message "Priority of current item set to %s" news))))
 
 (defun org-get-priority (s)
-  "Find priority cookie and return priority."
-  (save-match-data
-    (if (not (string-match org-priority-regexp s))
-	(* 1000 (- org-lowest-priority org-default-priority))
-      (* 1000 (- org-lowest-priority
-		 (string-to-char (match-string 2 s)))))))
+  "Find priority cookie and return priority.
 
+Priorities of the form [#<letter>]-<number> or
+[#<letter>]+<number> are supported with +/-<number> being
+optional and modifying the letter priority. The letter priority
+is multiplied by 100000 and then the number priority is added
+on. Thus a priority string of [#B]+5 is higher than [#B] which is
+higher than [#B]-2 and all are lower than [#A].
+"
+  (save-match-data
+    (let* ((priority-match (string-match org-priority-regexp s))
+   (priority-value (if priority-match
+       (* 100000 (- org-lowest-priority
+  (string-to-char (match-string 2 s))))
+     (* 100000 (- org-lowest-priority 
+org-default-priority))))
+   (sub-priority-match (match-string 3 s))
+   (sub-priority-value (if sub-priority-match
+   (string-to-number sub-priority-match) 0)))
+      (+ priority-value sub-priority-value))))
+    
 ;;;; Tags
 
 (defvar org-agenda-archives-mode)

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-10-27 12:01   ` I.S.
@ 2010-10-29 11:45     ` I.S.
  2010-10-29 11:53       ` I.S.
  0 siblings, 1 reply; 15+ messages in thread
From: I.S. @ 2010-10-29 11:45 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

Sorry, I realized the previous patch did not contain updates to the 
org-priority-regexp. An updated patch is attached.

Sorry,
-I.S.



On 10/27/2010 8:01 AM, I.S. wrote:
> On 10/24/2010 3:18 PM, David Maus wrote:
>> At Wed, 20 Oct 2010 13:14:39 -0400,
>> I.S. wrote:
>>> Dear Experts,
>>>
>>> I'd like to propose a replacement for the org-get-priority function
>>> which is backward compatible with the current version but allows the
>>> user to add a sub-priority such as [#A]-5 or [#B]+3:
>>>
>> Could you provide a patch against current master and send it to the
>> list as a text/plain attachment?  This way the proposed modification
>> will end up in Org's patchtracker[1].
>>
>> Best,
>>    -- David
>>
>> [1] http://patchwork.newartisans.com/project/org-mode/
>> -- 
>> OpenPGP... 0x99ADB83B5A4478E6
>> Jabber.... dmjena@jabber.org
>> Email..... dmaus@ictsoc.de
>
> I tried looing at patchwork but couldn't figure out what I was 
> supposed to do. Please advise on usage instructions.
>
> Instead, I attached a manually generated patch against org.el in the 
> development version from git. I created this patch via
>
> $ git clone git://repo.or.cz/org-mode.git
> $ emacs org-mode/lisp/org.el # to modify the file and write it to 
> org.mine.el
> $ diff -rup org.el org.mine.el > org-get-priority.patch
>
> Please advise on proper procedure as I love org and would enjoy the 
> chance to contribute in the future.
>
> Thanks,
> -I.S.
>


-- 
Thanks,
-I.S.


[-- Attachment #2: org-get-priority.patch --]
[-- Type: text/plain, Size: 2246 bytes --]

emin@martinian.com's password: 
--- org.el	2010-10-29 07:41:17.254401572 -0400
+++ org.mine.el	2010-10-29 07:41:49.162423931 -0400
@@ -6,7 +6,7 @@
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 7.02trans
+;; Version: 7.01trans
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -185,7 +185,7 @@ identifier."
 
 ;;; Version
 
-(defconst org-version "7.02trans"
+(defconst org-version "7.01trans"
   "The version number of the file org.el.")
 
 (defun org-version (&optional here)
@@ -12129,7 +12129,7 @@ from the `before-change-functions' in th
 
 ;;;; Priorities
 
-(defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]\\)\\] ?\\)"
+(defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]\\)\\]\\(-[0-9]+\\)? ?\\)"
   "Regular expression matching the priority indicator.")
 
 (defvar org-remove-priority-next-time nil)
@@ -12211,13 +12211,27 @@ ACTION can be `set', `up', `down', or a 
       (message "Priority of current item set to %s" news))))
 
 (defun org-get-priority (s)
-  "Find priority cookie and return priority."
-  (save-match-data
-    (if (not (string-match org-priority-regexp s))
-	(* 1000 (- org-lowest-priority org-default-priority))
-      (* 1000 (- org-lowest-priority
-		 (string-to-char (match-string 2 s)))))))
+  "Find priority cookie and return priority.
 
+Priorities of the form [#<letter>]-<number> or
+[#<letter>]+<number> are supported with +/-<number> being
+optional and modifying the letter priority. The letter priority
+is multiplied by 100000 and then the number priority is added
+on. Thus a priority string of [#B]+5 is higher than [#B] which is
+higher than [#B]-2 and all are lower than [#A].
+"
+  (save-match-data
+    (let* ((priority-match (string-match org-priority-regexp s))
+   (priority-value (if priority-match
+       (* 100000 (- org-lowest-priority
+  (string-to-char (match-string 2 s))))
+     (* 100000 (- org-lowest-priority 
+org-default-priority))))
+   (sub-priority-match (match-string 3 s))
+   (sub-priority-value (if sub-priority-match
+   (string-to-number sub-priority-match) 0)))
+      (+ priority-value sub-priority-value))))
+    
 ;;;; Tags
 
 (defvar org-agenda-archives-mode)

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-10-29 11:45     ` I.S.
@ 2010-10-29 11:53       ` I.S.
  2010-11-15 10:25         ` Carsten Dominik
  0 siblings, 1 reply; 15+ messages in thread
From: I.S. @ 2010-10-29 11:53 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]

Sorry, previous patch had some junk in it. Attached is the final version 
(really).

Sorry again for the confusion,
-I.S.

On 10/29/2010 7:45 AM, I.S. wrote:
> Sorry, I realized the previous patch did not contain updates to the 
> org-priority-regexp. An updated patch is attached.
>
> Sorry,
> -I.S.
>
>
>
> On 10/27/2010 8:01 AM, I.S. wrote:
>> On 10/24/2010 3:18 PM, David Maus wrote:
>>> At Wed, 20 Oct 2010 13:14:39 -0400,
>>> I.S. wrote:
>>>> Dear Experts,
>>>>
>>>> I'd like to propose a replacement for the org-get-priority function
>>>> which is backward compatible with the current version but allows the
>>>> user to add a sub-priority such as [#A]-5 or [#B]+3:
>>>>
>>> Could you provide a patch against current master and send it to the
>>> list as a text/plain attachment?  This way the proposed modification
>>> will end up in Org's patchtracker[1].
>>>
>>> Best,
>>>    -- David
>>>
>>> [1] http://patchwork.newartisans.com/project/org-mode/
>>> -- 
>>> OpenPGP... 0x99ADB83B5A4478E6
>>> Jabber.... dmjena@jabber.org
>>> Email..... dmaus@ictsoc.de
>>
>> I tried looing at patchwork but couldn't figure out what I was 
>> supposed to do. Please advise on usage instructions.
>>
>> Instead, I attached a manually generated patch against org.el in the 
>> development version from git. I created this patch via
>>
>> $ git clone git://repo.or.cz/org-mode.git
>> $ emacs org-mode/lisp/org.el # to modify the file and write it to 
>> org.mine.el
>> $ diff -rup org.el org.mine.el > org-get-priority.patch
>>
>> Please advise on proper procedure as I love org and would enjoy the 
>> chance to contribute in the future.
>>
>> Thanks,
>> -I.S.
>>


[-- Attachment #2: org-get-priority.patch --]
[-- Type: text/plain, Size: 1764 bytes --]

--- org.el	2010-10-29 07:41:17.254401572 -0400
+++ org.mine.el	2010-10-29 07:49:11.814892725 -0400
@@ -12129,7 +12129,7 @@ from the `before-change-functions' in th
 
 ;;;; Priorities
 
-(defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]\\)\\] ?\\)"
+(defvar org-priority-regexp ".*?\\(\\[#\\([A-Z0-9]\\)\\]\\(-[0-9]+\\)? ?\\)"
   "Regular expression matching the priority indicator.")
 
 (defvar org-remove-priority-next-time nil)
@@ -12211,13 +12211,27 @@ ACTION can be `set', `up', `down', or a 
       (message "Priority of current item set to %s" news))))
 
 (defun org-get-priority (s)
-  "Find priority cookie and return priority."
-  (save-match-data
-    (if (not (string-match org-priority-regexp s))
-	(* 1000 (- org-lowest-priority org-default-priority))
-      (* 1000 (- org-lowest-priority
-		 (string-to-char (match-string 2 s)))))))
+  "Find priority cookie and return priority.
 
+Priorities of the form [#<letter>]-<number> or
+[#<letter>]+<number> are supported with +/-<number> being
+optional and modifying the letter priority. The letter priority
+is multiplied by 100000 and then the number priority is added
+on. Thus a priority string of [#B]+5 is higher than [#B] which is
+higher than [#B]-2 and all are lower than [#A].
+"
+  (save-match-data
+    (let* ((priority-match (string-match org-priority-regexp s))
+   (priority-value (if priority-match
+       (* 100000 (- org-lowest-priority
+  (string-to-char (match-string 2 s))))
+     (* 100000 (- org-lowest-priority 
+org-default-priority))))
+   (sub-priority-match (match-string 3 s))
+   (sub-priority-value (if sub-priority-match
+   (string-to-number sub-priority-match) 0)))
+      (+ priority-value sub-priority-value))))
+    
 ;;;; Tags
 
 (defvar org-agenda-archives-mode)

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-10-29 11:53       ` I.S.
@ 2010-11-15 10:25         ` Carsten Dominik
  2010-11-15 12:07           ` Juan Pechiar
  2010-11-16  1:11           ` Matt Lundin
  0 siblings, 2 replies; 15+ messages in thread
From: Carsten Dominik @ 2010-11-15 10:25 UTC (permalink / raw)
  To: I.S.; +Cc: David Maus, emacs-orgmode

Hi everyone,

I would like to have a show of hands who is interested in this  
treatment of finer priorities.  Should we add this patch (I don't vote  
because I do not use priorities)

Thanks!

- Carsten

On Oct 29, 2010, at 1:53 PM, I.S. wrote:

> Sorry, previous patch had some junk in it. Attached is the final  
> version (really).
>
> Sorry again for the confusion,
> -I.S.
>
> On 10/29/2010 7:45 AM, I.S. wrote:
>> Sorry, I realized the previous patch did not contain updates to the  
>> org-priority-regexp. An updated patch is attached.
>>
>> Sorry,
>> -I.S.
>>
>>
>>
>> On 10/27/2010 8:01 AM, I.S. wrote:
>>> On 10/24/2010 3:18 PM, David Maus wrote:
>>>> At Wed, 20 Oct 2010 13:14:39 -0400,
>>>> I.S. wrote:
>>>>> Dear Experts,
>>>>>
>>>>> I'd like to propose a replacement for the org-get-priority  
>>>>> function
>>>>> which is backward compatible with the current version but allows  
>>>>> the
>>>>> user to add a sub-priority such as [#A]-5 or [#B]+3:
>>>>>
>>>> Could you provide a patch against current master and send it to the
>>>> list as a text/plain attachment?  This way the proposed  
>>>> modification
>>>> will end up in Org's patchtracker[1].
>>>>
>>>> Best,
>>>>   -- David
>>>>
>>>> [1] http://patchwork.newartisans.com/project/org-mode/
>>>> -- 
>>>> OpenPGP... 0x99ADB83B5A4478E6
>>>> Jabber.... dmjena@jabber.org
>>>> Email..... dmaus@ictsoc.de
>>>
>>> I tried looing at patchwork but couldn't figure out what I was  
>>> supposed to do. Please advise on usage instructions.
>>>
>>> Instead, I attached a manually generated patch against org.el in  
>>> the development version from git. I created this patch via
>>>
>>> $ git clone git://repo.or.cz/org-mode.git
>>> $ emacs org-mode/lisp/org.el # to modify the file and write it to  
>>> org.mine.el
>>> $ diff -rup org.el org.mine.el > org-get-priority.patch
>>>
>>> Please advise on proper procedure as I love org and would enjoy  
>>> the chance to contribute in the future.
>>>
>>> Thanks,
>>> -I.S.
>>>
>
> <org-get- 
> priority.patch>_______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-15 10:25         ` Carsten Dominik
@ 2010-11-15 12:07           ` Juan Pechiar
  2010-11-15 12:15             ` Carsten Dominik
  2010-11-15 18:05             ` I.S.
  2010-11-16  1:11           ` Matt Lundin
  1 sibling, 2 replies; 15+ messages in thread
From: Juan Pechiar @ 2010-11-15 12:07 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: David Maus, emacs-orgmode, I.S.

I'm against feature-itis.

Orgmode has been losing some of its elegance to feature requests. And
by 'elegance' I mean ease of learning and using and maintaining, and
not having to decide between N different ways of achieving something
just because so many border-case features exist.

The agenda is for things you have to do today. Just do them.

If you need ordering, you have outlines and lists, properties, LISP,
hooks, column view, custom agenda views, etc.

Regards,
.j.

On Mon, Nov 15, 2010 at 11:25:30AM +0100, Carsten Dominik wrote:
> I would like to have a show of hands who is interested in this
> treatment of finer priorities.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-15 12:07           ` Juan Pechiar
@ 2010-11-15 12:15             ` Carsten Dominik
  2010-11-15 18:05             ` I.S.
  1 sibling, 0 replies; 15+ messages in thread
From: Carsten Dominik @ 2010-11-15 12:15 UTC (permalink / raw)
  To: Juan Pechiar; +Cc: David Maus, emacs-orgmode, I.S.


On Nov 15, 2010, at 1:07 PM, Juan Pechiar wrote:

> I'm against feature-itis.
>
> Orgmode has been losing some of its elegance to feature requests.

Do you have concrete examples?  Maybe we can correct mistakes?

- Carsten

> And
> by 'elegance' I mean ease of learning and using and maintaining, and
> not having to decide between N different ways of achieving something
> just because so many border-case features exist.
>
> The agenda is for things you have to do today. Just do them.
>
> If you need ordering, you have outlines and lists, properties, LISP,
> hooks, column view, custom agenda views, etc.
>
> Regards,
> .j.
>
> On Mon, Nov 15, 2010 at 11:25:30AM +0100, Carsten Dominik wrote:
>> I would like to have a show of hands who is interested in this
>> treatment of finer priorities.

- Carsten

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-15 12:07           ` Juan Pechiar
  2010-11-15 12:15             ` Carsten Dominik
@ 2010-11-15 18:05             ` I.S.
  2010-11-16  0:30               ` Samuel Wales
  2010-11-17  8:16               ` Carsten Dominik
  1 sibling, 2 replies; 15+ messages in thread
From: I.S. @ 2010-11-15 18:05 UTC (permalink / raw)
  To: Juan Pechiar; +Cc: David Maus, emacs-orgmode, Carsten Dominik

On 11/15/2010 7:07 AM, Juan Pechiar wrote:
> I'm against feature-itis.
>
> Orgmode has been losing some of its elegance to feature requests. And
> by 'elegance' I mean ease of learning and using and maintaining, and
> not having to decide between N different ways of achieving something
> just because so many border-case features exist.
>
> The agenda is for things you have to do today. Just do them.
>
> If you need ordering, you have outlines and lists, properties, LISP,
> hooks, column view, custom agenda views, etc.
>
> Regards,
> .j.
>
> On Mon, Nov 15, 2010 at 11:25:30AM +0100, Carsten Dominik wrote:
>> I would like to have a show of hands who is interested in this
>> treatment of finer priorities.
That may be a fair point (although I tend to think that most of the 
features in orgmode are really useful). I'd like to point out, however, 
that the proposed change is completely backward compatible. If you don't 
want finer grained priorities, just don't add -<NUM>.

Personally, I vote yes because I find the priorities in TODO lists very 
useful. In addition, I often find that I want to insert a new item 
between two existing ones and therefore having fine-grained priorities 
makes this easy to do.

-- 
Thanks,
-I.S.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-15 18:05             ` I.S.
@ 2010-11-16  0:30               ` Samuel Wales
  2010-11-17  8:16               ` Carsten Dominik
  1 sibling, 0 replies; 15+ messages in thread
From: Samuel Wales @ 2010-11-16  0:30 UTC (permalink / raw)
  To: I.S.; +Cc: David Maus, Juan Pechiar, emacs-orgmode, Carsten Dominik

I would use tags to accomplish the same thing as enhanced priorities.

User-defined sorting allows this in both the agenda and the outline.

Maybe somebody can summarize the benefits of enhanced priorities over
more priorites, tags, properties, etc.?

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-15 10:25         ` Carsten Dominik
  2010-11-15 12:07           ` Juan Pechiar
@ 2010-11-16  1:11           ` Matt Lundin
  1 sibling, 0 replies; 15+ messages in thread
From: Matt Lundin @ 2010-11-16  1:11 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: David Maus, emacs-orgmode, I.S.

Carsten Dominik <carsten.dominik@gmail.com> writes:

> I would like to have a show of hands who is interested in this
> treatment of finer priorities.  Should we add this patch (I don't vote
> because I do not use priorities)

-1

Org-mode power users in need of finer-grained priority control already
have the option of widening the range of priorities with
org-highest-priority and org-lowest-priority or a #+PRIORITIES line. One
could also use custom "tags" + a user defined sorting command to
accomplish something similar.

I believe that, as a rule, if a peculiar use-case can already be
accomplished with current hooks and variables, a new way of doing the
same thing should not be hard-coded, unless it dramatically simplifies
the code and user experience.

- Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-15 18:05             ` I.S.
  2010-11-16  0:30               ` Samuel Wales
@ 2010-11-17  8:16               ` Carsten Dominik
  2010-11-17 13:11                 ` I.S.
  2010-11-17 19:21                 ` Matt Lundin
  1 sibling, 2 replies; 15+ messages in thread
From: Carsten Dominik @ 2010-11-17  8:16 UTC (permalink / raw)
  To: I.S.; +Cc: David Maus, Juan Pechiar, emacs-orgmode

Hi I.S.

I have not added you patch as it is, because in some ways the syntax  
it adds is
questionable, and, as others have pointed out, sorting can be done in  
different ways, too.

However, instead, I have introduced a variable that can be set to a  
user-defined function to compute the base priority of a node.  So you  
can simply put your function into that variable and continue to use  
your special syntax, with us making it an official Org syntax.

The name of the variable is org-get-priority-function.

I hope this helps.

- Carsten

On Nov 15, 2010, at 7:05 PM, I.S. wrote:

> On 11/15/2010 7:07 AM, Juan Pechiar wrote:
>> I'm against feature-itis.
>>
>> Orgmode has been losing some of its elegance to feature requests. And
>> by 'elegance' I mean ease of learning and using and maintaining, and
>> not having to decide between N different ways of achieving something
>> just because so many border-case features exist.
>>
>> The agenda is for things you have to do today. Just do them.
>>
>> If you need ordering, you have outlines and lists, properties, LISP,
>> hooks, column view, custom agenda views, etc.
>>
>> Regards,
>> .j.
>>
>> On Mon, Nov 15, 2010 at 11:25:30AM +0100, Carsten Dominik wrote:
>>> I would like to have a show of hands who is interested in this
>>> treatment of finer priorities.
> That may be a fair point (although I tend to think that most of the  
> features in orgmode are really useful). I'd like to point out,  
> however, that the proposed change is completely backward compatible.  
> If you don't want finer grained priorities, just don't add -<NUM>.
>
> Personally, I vote yes because I find the priorities in TODO lists  
> very useful. In addition, I often find that I want to insert a new  
> item between two existing ones and therefore having fine-grained  
> priorities makes this easy to do.
>
> -- 
> Thanks,
> -I.S.
>

- Carsten

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-17  8:16               ` Carsten Dominik
@ 2010-11-17 13:11                 ` I.S.
  2010-11-17 19:21                 ` Matt Lundin
  1 sibling, 0 replies; 15+ messages in thread
From: I.S. @ 2010-11-17 13:11 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: David Maus, Juan Pechiar, emacs-orgmode

On 11/17/2010 3:16 AM, Carsten Dominik wrote:
> Hi I.S.
>
> I have not added you patch as it is, because in some ways the syntax 
> it adds is
> questionable, and, as others have pointed out, sorting can be done in 
> different ways, too.
>
> However, instead, I have introduced a variable that can be set to a 
> user-defined function to compute the base priority of a node.  So you 
> can simply put your function into that variable and continue to use 
> your special syntax, with us making it an official Org syntax.
>
> The name of the variable is org-get-priority-function.
>
> I hope this helps.
>
> - Carsten
>

Thank you. That is a fine solution for me.

-- 
Thanks,
-I.S.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: proposal for enhanced org-get-priority function
  2010-11-17  8:16               ` Carsten Dominik
  2010-11-17 13:11                 ` I.S.
@ 2010-11-17 19:21                 ` Matt Lundin
  1 sibling, 0 replies; 15+ messages in thread
From: Matt Lundin @ 2010-11-17 19:21 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: David Maus, Juan Pechiar, emacs-orgmode, I.S.

Carsten Dominik <carsten.dominik@gmail.com> writes:

> I have not added you patch as it is, because in some ways the syntax
> it adds is questionable, and, as others have pointed out, sorting can
> be done in different ways, too.
>
> However, instead, I have introduced a variable that can be set to a
> user-defined function to compute the base priority of a node.  So you
> can simply put your function into that variable and continue to use
> your special syntax, with us making it an official Org syntax.
>
> The name of the variable is org-get-priority-function.

Thanks, Carsten, as always, for coming up with an elegant solution that
keeps Org nice and simple for new users, while nonetheless allowing us
power users to keep refining our ~/.emacs. :)

Best,
Matt

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-11-17 19:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20 17:14 proposal for enhanced org-get-priority function I.S.
2010-10-24 19:18 ` David Maus
2010-10-24 20:05   ` George Pearson
2010-10-27 12:01   ` I.S.
2010-10-29 11:45     ` I.S.
2010-10-29 11:53       ` I.S.
2010-11-15 10:25         ` Carsten Dominik
2010-11-15 12:07           ` Juan Pechiar
2010-11-15 12:15             ` Carsten Dominik
2010-11-15 18:05             ` I.S.
2010-11-16  0:30               ` Samuel Wales
2010-11-17  8:16               ` Carsten Dominik
2010-11-17 13:11                 ` I.S.
2010-11-17 19:21                 ` Matt Lundin
2010-11-16  1:11           ` Matt Lundin

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).