From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: formatting times as HH:MM with leading zeros Date: Wed, 20 Jan 2010 07:59:45 -0500 Message-ID: <87zl49ue2m.fsf@fastmail.fm> References: <21605.1263981063@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXa9J-0005Fe-Mw for emacs-orgmode@gnu.org; Wed, 20 Jan 2010 07:59:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXa9E-0005CS-Ra for emacs-orgmode@gnu.org; Wed, 20 Jan 2010 07:59:04 -0500 Received: from [199.232.76.173] (port=35510 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXa9E-0005CJ-KQ for emacs-orgmode@gnu.org; Wed, 20 Jan 2010 07:59:00 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:52959) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXa9E-0004HJ-2j for emacs-orgmode@gnu.org; Wed, 20 Jan 2010 07:59:00 -0500 In-Reply-To: <21605.1263981063@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> (Stephen Eglen's message of "Wed, 20 Jan 2010 09:51:03 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Stephen Eglen Cc: emacs-orgmode@gnu.org Hi Stephen, Stephen Eglen 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)))) >