From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Agenda search: setting sort-order Date: Wed, 1 Aug 2018 20:28:34 -0500 Message-ID: References: <87bmc6edfo.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d035f3057269ba08" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fl2Pt-0003FH-8x for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 21:28:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fl2Ps-0007r1-6v for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 21:28:37 -0400 Received: from mail-it0-x22c.google.com ([2607:f8b0:4001:c0b::22c]:52227) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fl2Pr-0007q2-Tp for emacs-orgmode@gnu.org; Wed, 01 Aug 2018 21:28:36 -0400 Received: by mail-it0-x22c.google.com with SMTP id d9-v6so980702itf.2 for ; Wed, 01 Aug 2018 18:28:35 -0700 (PDT) In-Reply-To: <87bmc6edfo.fsf@nicolasgoaziou.fr> 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" To: Nicolas Goaziou Cc: emacs-orgmode --000000000000d035f3057269ba08 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 19, 2018 at 3:20 PM, Nicolas Goaziou wrote: > Hello, > > Nathan Neff writes: > > > I had a look at org-agenda.el, and took a first stab at "coding" :) > > I fixed the sorting problem when using agenda-search-view, and > > I have a DIFF/patch at the bottom of this e-mail [1] that provided the > fix. > > > > Would this be of interest to the org-mode project? > > IMO, the Org mode project is interested in having its bugs fixed ;) > > > This code fixes the > > problem, > > but it is duplicated in the function org-agenda-get-todos, and seems > > redundant, > > therefore a more "long term" fix would probably not resemble the minor > patch > > below. Also, I have no experience with lisp, nor the org-mode > > codebase :-O > > A more "long term" fix would be to rewrite the agenda (asynchronous, > more scalable, better API for external use). > > > Here's steps I used to find the problem. Feel free to skip to [1] > > for the DIFF/patch. > > Would you mind sending it using `git format-patch'? > Hi Nicolas, I'm a bit leery of submitting these lines of code - one reason is that the sort feature still really doesn't work very well. IIRC, the results are globally sorted by timestamp, but there's results with NULL or no timestamps mixed in. In other words, results are something like: * foo 12/1/2001 * bar 12/2/2002 * baz * blech 12/2/2003 * another So, it's not really a fix, and I'm not sure this is even good code :) If someone wants to grab the fix and jump from here, that's fine, it's only a few lines. Thanks, --Nate > > Thank you. > > Regards, > > -- > Nicolas Goaziou > --000000000000d035f3057269ba08 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Jun 19, 2018 at 3:20 PM, Nicolas Goaziou <= mail@nicolasgoa= ziou.fr> wrote:
Hello,

Nathan Neff <nathan.neff@gmail.= com> writes:

> I had a look at org-agenda.el, and took a first stab at "coding&q= uot; :)
> I fixed the sorting problem when using agenda-search-view, and
> I have a DIFF/patch at the bottom of this e-mail [1] that provided the= fix.
>
> Would this be of interest to the org-mode project?

IMO, the Org mode project is interested in having its bugs fixed ;)<= br>
> This code fixes the
> problem,
> but it is duplicated in the function org-agenda-get-todos, and seems > redundant,
> therefore a more "long term" fix would probably not resemble= the minor patch
> below.=C2=A0 Also, I have no experience with lisp, nor the org-mode > codebase :-O

A more "long term" fix would be to rewrite the agenda (asy= nchronous,
more scalable, better API for external use).

> Here's steps I used to find the problem.=C2=A0 Feel free to skip t= o [1]
> for the DIFF/patch.

Would you mind sending it using `git format-patch'?

Hi Nicolas,

I'm a bit = leery of submitting these lines of code - one reason is that
the = sort feature still really doesn't work very well.=C2=A0 IIRC, the resul= ts
are globally sorted by timestamp, but there's results with= NULL or=C2=A0
no timestamps mixed in. =C2=A0

In other words, results are something like:

= * foo 12/1/2001
* bar 12/2/2002
* baz <no timestamp&= gt;
* blech 12/2/2003
* another <no timestamp>

So, it's not really a fix, and I'm not sure = this is even good code :)
If someone wants to grab the fix and ju= mp from here, that's fine, it's only=C2=A0
a few lines.

Thanks,
--Nate
=C2=A0

Thank you.

Regards,

--
Nicolas Goaziou

--000000000000d035f3057269ba08--