emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Kyle Meyer <kyle@kyleam.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [RFC/PATCH] Fixes for org-timer
Date: Wed, 03 Dec 2014 18:16:58 +0100	[thread overview]
Message-ID: <871togk60l.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <874mtdjmiv.fsf@kmlap.domain.org> (Kyle Meyer's message of "Wed, 03 Dec 2014 01:05:44 -0500")

Hello,

Kyle Meyer <kyle@kyleam.com> 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	other threads:[~2014-12-03 17:16 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 [this message]
2014-12-03 18:54   ` Kyle Meyer
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=871togk60l.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /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).