From: Kyle Meyer <kyle@kyleam.com>
To: Brice Waegenire <brice.wge@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-timer.el: Use hh:mm:ss format instead of minutes
Date: Fri, 24 Apr 2015 12:49:22 -0400 [thread overview]
Message-ID: <874mo58oa5.fsf@kmlap.domain.org> (raw)
In-Reply-To: <CAL5NfX3Mqp3Q4Ngs8obhVPzn9si6p=07ZuawAh_LKNhoN=6H=g@mail.gmail.com> (Brice Waegenire's message of "Fri, 24 Apr 2015 14:48:52 +0200")
Brice Waegenire <brice.wge@gmail.com> wrote:
> Hello,
>
> I've hacked a patch that use hh:mm:ss format instead of minutes for
> org-timer-set-timer. I'm really not sure I did it in the right way,
> any sugestions are welcome.
[...]
Thanks.
I think it's nice to be able to specify seconds, but now you have to
type 'N:00' (or at least 'N:0') instead of 'N' to get N minutes. Should
a plain number default to minutes? I don't use org-timer very much, so
I don't have a strong preference.
> --- a/lisp/org-timer.el
> +++ b/lisp/org-timer.el
> @@ -429,17 +429,14 @@ using three `C-u' prefix arguments."
> (minutes (or (and (not (equal opt '(64)))
> effort-minutes
> (number-to-string effort-minutes))
> - (and (numberp opt) (number-to-string opt))
> - (and (listp opt) (not (null opt))
> - (number-to-string org-timer-default-timer))
By removing the listp check, you no longer get the C-u behavior
described in the docstring.
> + (and (stringp opt) (prin1 opt))
Why not `(and (stringp opt) opt)'?
> (read-from-minibuffer
> - "How many minutes left? "
> + "How many time left? "
s/many/much/. Also, it'd be nice to specify the format in the prompt.
> (if (not (eq org-timer-default-timer 0))
> - (number-to-string org-timer-default-timer))))))
> + (prin1 org-timer-default-timer))))))
The defcustom for org-timer-default-timer still says it should be a
number. If set to a number other than 0, this will fail. Perhaps
org-timer-default-timer should be updated to be a string in the hh:mm:ss
format.
--
Kyle
next prev parent reply other threads:[~2015-04-24 16:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 12:48 [PATCH] org-timer.el: Use hh:mm:ss format instead of minutes Brice Waegenire
2015-04-24 16:49 ` Kyle Meyer [this message]
2015-04-29 21:52 ` Brice Waegenire
2015-04-30 0:38 ` Kyle Meyer
2015-05-01 8:47 ` Nicolas Goaziou
2015-05-05 14:34 ` Brice Waegenire
2015-05-07 20:09 ` Nicolas Goaziou
2015-06-02 21:04 ` Brice Waegenire
2015-06-02 21:24 ` Nicolas Goaziou
2015-06-03 22:00 ` Brice Waegenire
2015-06-06 7:30 ` Nicolas Goaziou
2015-08-05 0:00 ` Bastien Guerry
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mo58oa5.fsf@kmlap.domain.org \
--to=kyle@kyleam.com \
--cc=brice.wge@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.