From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: [RFC/PATCH] Fixes for org-timer Date: Wed, 03 Dec 2014 13:54:38 -0500 Message-ID: <87sigwa7ip.fsf@kyleam.com> References: <874mtdjmiv.fsf@kmlap.domain.org> <871togk60l.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwF4Z-0000uq-GS for emacs-orgmode@gnu.org; Wed, 03 Dec 2014 13:54:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwF4T-0002tv-Ch for emacs-orgmode@gnu.org; Wed, 03 Dec 2014 13:54:47 -0500 Received: from mail-qc0-f179.google.com ([209.85.216.179]:45561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwF4T-0002tr-8f for emacs-orgmode@gnu.org; Wed, 03 Dec 2014 13:54:41 -0500 Received: by mail-qc0-f179.google.com with SMTP id c9so11380629qcz.24 for ; Wed, 03 Dec 2014 10:54:40 -0800 (PST) Received: from localhost (nat-130-132-173-5.central.yale.edu. [130.132.173.5]) by mx.google.com with ESMTPSA id l48sm17876619qgd.38.2014.12.03.10.54.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Dec 2014 10:54:39 -0800 (PST) In-Reply-To: <871togk60l.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Wed, 03 Dec 2014 18:16:58 +0100") 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: Org-mode Nicolas Goaziou wrote: [...] >> However, I'd actually be in favor of removing this functionality >> from org-timer (and org-timer-start) since it's already available >> directly through the interactive command >> org-timer-change-times-in-region. > > It saves a keybinding (`org-timer' has one, but not > `org-timer-change-times-in-region'). Fair enough (I don't think it's likely to be used regularly, so I wasn't giving that much weight). [...] >> Perhaps it would alsbo be helpful to make it clearer which >> commands belong to the two different timers. This is clear in the >> manual (the relative and countdown timer have different >> documentation pages), but what do you think about renaming >> countdown timer commands to have 'countdown' after 'org-timer' >> (e.g., org-timer-countdown-set-timer)? > > When I fixed a bug there recently, I was indeed surprised the code was > very confusing. For example, `org-timer-stop' is for relative timers > whereas `org-timer-cancel' is for countdown ones. Agreed. I initially went there hunting one bug. > Instead of renaming, I think we could make both timer types use the same > API (minus, maybe, start functions). Yes, I think this is a good way to go. As you mention, the start functions (org-timer, org-timer-start, and org-timer-set-timer) would probably be difficult to merge given the arguments they take. org-timer-stop and org-timer-cancel should be simple to merge. Currently, there is no function to pause the countdown timer, so I'll need to teach org-timer-pause-or-continue how to do that. Do you prefer to add fixes for the current design, or just move directly to merging the two APIs? > Also, some comments at the beginning of the library could help. > > AFAIK, there are no tests for timers. Adding a new "test-timer.el" with > a few tests would be nice, if you have some spare time and energy. Yes, both of those would be good to have, and I'm happy to add them. Thanks for your comments. -- Kyle