From: Kyle Meyer <kyle@kyleam.com>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [RFC/PATCH] Fixes for org-timer
Date: Wed, 03 Dec 2014 13:54:38 -0500 [thread overview]
Message-ID: <87sigwa7ip.fsf@kyleam.com> (raw)
In-Reply-To: <871togk60l.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Wed, 03 Dec 2014 18:16:58 +0100")
Nicolas Goaziou <mail@nicolasgoaziou.fr> 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
next prev parent reply other threads:[~2014-12-03 18:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 6:05 [RFC/PATCH] Fixes for org-timer Kyle Meyer
2014-12-03 17:16 ` Nicolas Goaziou
2014-12-03 18:54 ` Kyle Meyer [this message]
2014-12-03 21:39 ` Nicolas Goaziou
2014-12-07 8:11 ` Kyle Meyer
2014-12-09 9:18 ` Nicolas Goaziou
2014-12-13 9:46 ` Achim Gratz
2014-12-13 16:03 ` Nicolas Goaziou
2014-12-13 16:15 ` Achim Gratz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sigwa7ip.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).