[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: formatting times as HH:MM with leading zeros
From: |
Matt Lundin |
Subject: |
[Orgmode] Re: formatting times as HH:MM with leading zeros |
Date: |
Wed, 20 Jan 2010 07:59:45 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) |
Hi Stephen,
Stephen Eglen <address@hidden> writes:
> Just a small suggestion here. In the agenda, an entry like:
> * <2010-01-20 Wed 09:00-09:30> test
>
> gets formatted as follows:
>
> Wednesday 20 January 2010
> 8:00...... ----------------
> test: 9:00- 9:30 test
> 10:00...... ----------------
>
> the leading whitespace before '9:00' and '9:30' is needed to align the
> times, but having the space after the dash looks odd (at least to my
> latex-trained eyes). Would it be possible to patch org-agenda to put a
> leading zero rather than leading whitespace. With this patch, I see:
>
> Wednesday 20 January 2010
> 08:00...... ----------------
> test: 09:00-09:30 test
> 10:00...... ----------------
>
If I might chime in, I would request that this change be implemented as
an option, not as a default. I greatly prefer the display method as it
stands.
Best,
Matt
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index a20bec5..77062ed 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -4902,6 +4902,7 @@ HH:MM."
> (mod h1 24) h1))
> (t0 (+ (* 100 h2) m))
> (t1 (concat (if (>= h1 24) "+" " ")
> + (if (< t0 1000) "0" "") ;zero-pad times before 10:00
> (if (< t0 100) "0" "")
> (if (< t0 10) "0" "")
> (int-to-string t0))))
>