From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC/PATCH] Fixes for org-timer Date: Wed, 03 Dec 2014 18:16:58 +0100 Message-ID: <871togk60l.fsf@nicolasgoaziou.fr> References: <874mtdjmiv.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwDXA-00034O-6n for emacs-orgmode@gnu.org; Wed, 03 Dec 2014 12:16:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwDX3-0001iM-FV for emacs-orgmode@gnu.org; Wed, 03 Dec 2014 12:16:12 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:48876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwDX3-0001hv-AP for emacs-orgmode@gnu.org; Wed, 03 Dec 2014 12:16:05 -0500 In-Reply-To: <874mtdjmiv.fsf@kmlap.domain.org> (Kyle Meyer's message of "Wed, 03 Dec 2014 01:05:44 -0500") 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: Kyle Meyer Cc: Org-mode Hello, Kyle Meyer writes: > I've attached a few patches for org-timer.el. Thank you. > Some additional comments on two of the patches: > > [PATCH 1/4] org-timer.el (org-timer): Recognize double prefix > > This patch makes org-timer behave as described in the docstring when > it is given a double prefix argument. 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'). > [PATCH 4/4] org-timer.el: Isolate commands of different timers > > This patch fixes several issues that were caused by executing a > relative timer command when the countdown timer was running, or vice > versa (see log message for details). Great. > 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. Instead of renaming, I think we could make both timer types use the same API (minus, maybe, start functions). 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. WDYT? Regards, -- Nicolas Goaziou