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: Kyle Meyer
Subject: Re: [O] [RFC/PATCH] Fixes for org-timer
Date: Wed, 03 Dec 2014 13:54:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Nicolas Goaziou <address@hidden> 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



reply via email to

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