emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [RFC/PATCH] Fixes for org-timer


From: Nicolas Goaziou
Subject: Re: [O] [RFC/PATCH] Fixes for org-timer
Date: Wed, 03 Dec 2014 18:16:58 +0100

Hello,

Kyle Meyer <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]