From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: Bug: org-2ft and/or float-time is wrong [9.1.2 (9.1.2-22-ga2a034-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20171023/)] Date: Fri, 03 Nov 2017 06:56:29 +1100 Message-ID: <87r2tgwj2q.fsf@gmail.com> References: <87bmknkwhe.fsf@nicolasgoaziou.fr> <87tvyfjgjk.fsf@nicolasgoaziou.fr> <87tvyelb60.fsf@gmail.com> <87shdykuxc.fsf@gmail.com> <87r2thlewz.fsf@gmail.com> <87o9oll5r8.fsf@gmail.com> <874lqdth1r.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eALbU-00046y-Vh for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 15:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eALbU-0005xA-7h for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 15:56:41 -0400 Received: from mail-pg0-x22a.google.com ([2607:f8b0:400e:c05::22a]:49826) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eALbU-0005vW-1H for emacs-orgmode@gnu.org; Thu, 02 Nov 2017 15:56:40 -0400 Received: by mail-pg0-x22a.google.com with SMTP id g6so529406pgn.6 for ; Thu, 02 Nov 2017 12:56:39 -0700 (PDT) In-reply-to: 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: Allen Li Cc: emacs-orgmode@gnu.org, Nicolas Goaziou Allen Li writes: > On Wed, Nov 1, 2017 at 9:56 PM, Tim Cross wrote: >> > >> To correctly fix this, I feel more analysis is warranted. I'm prepared >> to look at this and present a summary and options, but it will have to >> wait until after 21st when I start leave from work. It is a complex area >> and perhaps my skills won't be up to it, but I should at least be able >> to identify the main areas needing attention/decisions. > > My initial approach would be to do some refactoring here, especially > among org-2ft, org-matcher-time, and org-parse-time-string, each of > which calls the others in a cycle and each share a part of the logic > for interpreting Org mode timestamps. > > I'm not familiar with refactoring FOSS code via mailed patches, nor if > Org maintainers would welcome such patches, but I would be willing to > do some refactoring here. > I think what I will do is start with adding/extending the tests relating to timestamps and clock tables. This should - help ensure I understand the required functionality - may help identify existing bugs - help ensure any refactoring does not have undesired side effects or loss of functionality I also suspect it will be a good way for core org maintainers to verify I'm on the right track and haven't missed anything before making any changes to the code base. I'm not a big TDD advocate, but when working with an unfamiliar code base, I've found developing tests first is a good approach to ensure you really do understand existing and required functionality. regards, Tim -- Tim Cross