emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] agenda: personal priority for today


From: Christopher Allan Webber
Subject: Re: [O] agenda: personal priority for today
Date: Tue, 16 Apr 2013 10:58:55 -0500
User-agent: mu4e 0.9.9.5-dev5; emacs 24.1.50.1

Bastien writes:

> Hi Christopher,
>
> Christopher Allan Webber <address@hidden> writes:
>
>> I wonder if we had a property that was basically sorting on very large
>> numbers?  When you add something to the agenda and there aren't any
>> sorted items, it creates a property with some median-ish very large
>> number.  As you move things up and down on the agenda it sorts in random
>> ranges between the chunks of huge number space per item.  This would be
>> a goofy but workable solution?
>
> I don't know -- it's hard to make sure we speak about the same things
> when brainstorming like this.  Where would you store the property you
> are talking to (for example)?  Sorry for the non-romantic question :)

Just store the property on the item itself, like:

#+BEGIN_SRC org
* My Tasklist

** TODO This task second
   :PROPERTIES:
   :Sorting:  5029662198291
   :END:

** TODO This task last
   :PROPERTIES:
   :Sorting:  4362296268052
   :END:

* Another tasklist

** TODO This task first
   :PROPERTIES:
   :Sorting:  6495792999082
   :END:
#+END_SRC

in theory, if you have numbers large enough, you should be able to
usually find something that's above or in-between to generate sorting
between things.

So if we wanted to move the last task to the second task, and we're on
our agenda and we see the following tasks:

sometask   Sched.4x:  TODO This task first
sometask   Sched.4x:  TODO This task second
sometask   Sched.4x:  TODO This task last

and we ask to move third up between second and first, it'll just pick a
new random number between that range, like:

random.randrange(5029662198291, 6495792999082)

so if we got 6417343542884 back, we would set that as the sorting
property for the task named "This task last" (which would then no longer
be last, it would be second! ;))




reply via email to

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