From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Bausch Subject: Re: agenda: personal priority for today Date: Thu, 11 Apr 2013 08:27:52 +0200 Message-ID: <516657E8.90003@dvs.tu-darmstadt.de> References: <51655C8A.4070806@haas-heinrich.de> <87mwt60z8j.fsf@bzg.ath.cx> <87li8qnfgb.fsf@earlgrey.lan> <87hajeyn9y.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQAz1-0000f1-3w for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 02:27:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQAyy-0006R2-BO for emacs-orgmode@gnu.org; Thu, 11 Apr 2013 02:27:43 -0400 In-Reply-To: <87hajeyn9y.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org Hi, Am 11.04.2013 01:32, schrieb Bastien: > Hi Christopher, >=20 > Christopher Allan Webber writes: >=20 >> 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 rand= om >> ranges between the chunks of huge number space per item. This would b= e >> a goofy but workable solution? >=20 > 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 :) >=20 I have got another idea: all we need for sorting (from a technical POV) is a partial order. Why not store exactly that as a property? Assume every TODO entry has an ID (if it has none and it is required to store the order, just create one automatically). Then if an entry on the agenda is reordered, store in a property (e.g. AGENDA_BEFORE), the IDs of the items that should be sorted after the moved item. To keep things minimal, maybe store only those IDs, which are absolutely required to enforce the desired position. But for an easy and effective implementation, it is also feasible to store all IDs of the currently visible items that should sort after the moved item. Maybe the IDs need to be prefixed with a filename or better a file ID so it works on different machines with different directory layout. Otherwise the IDs would need to be globally unique (which is not bad by its own, when items may move between files.) Regards, Daniel Bausch --=20 Daniel Bausch Wissenschaftlicher Mitarbeiter Technische Universit=E4t Darmstadt Fachbereich Informatik Fachgebiet Datenbanken und Verteilte Systeme Hochschulstra=DFe 10 64289 Darmstadt Germany Tel.: +49 6151 16 6706 Fax: +49 6151 16 6229