From: Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org, Matt Lundin <mdl@imapmail.org>,
Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
Subject: Re: Re: formatting times as HH:MM with leading zeros
Date: Wed, 20 Jan 2010 20:28:44 +0000 [thread overview]
Message-ID: <23017.1264019324@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> (raw)
In-Reply-To: <F9B1BD87-C5C6-4AC0-9F51-0C34A349850B@gmail.com>
Thanks Carsten.
> P.S. I know you have signed some copyright papers. Do they cover all
> of Emacs?
yes, all of emacs.
Here is patch and suggested changelog.
thanks!
Stephen
p.s. 'M-x occur RET Non-nil means, RET' in org-agenda.el shows 33
instances of where a comma has been placed after the word 'means'. I
think this is wrong, and a misinterpretation of the advice from
elisp.info:
* The documentation string for a variable that is a yes-or-no flag
should start with words such as "Non-nil means," to make it clear
that all non-`nil' values are equivalent and indicate explicitly
what `nil' and non-`nil' mean.
as I think the comma before the closing quote is supposed to be outside
the quote (US style). Likewise, grep shows this typo in many other
places in org lisp files. Compare with files.el from Emacs, where you
always see 'Non-nil means 'without the comma.
2010-01-20 Stephen Eglen <stephen@gnu.org>
* org-agenda.el (org-get-time-of-day): Use
org-agenda-time-leading-zero to allow leading zero (rather than
space) for times.
*** /var/folders/46/46z6IiS7Fkihleb0T+9Yvk+++TI/-Tmp-/ediff20705uea Wed Jan 20 20:18:24 2010
--- /Users/stephen/langs/emacs/elisp-ds/org-mode/lisp/org-agenda.el Wed Jan 20 20:18:20 2010
***************
*** 805,810 ****
--- 805,816 ----
(format "%-10s %2d %s %4d%s"
dayname day monthname year weekstring)))
+ (defcustom org-agenda-time-leading-zero nil
+ "Non-nil means use leading zero for military times in agenda.
+ For example, 9:30am would become 09:30 rather than 9:30."
+ :group 'org-agenda-daily/weekly
+ :type 'boolean)
+
(defcustom org-agenda-weekend-days '(6 0)
"Which days are weekend?
These days get the special face `org-agenda-date-weekend' in the agenda
***************
*** 4902,4907 ****
--- 4908,4915 ----
(mod h1 24) h1))
(t0 (+ (* 100 h2) m))
(t1 (concat (if (>= h1 24) "+" " ")
+ (if (and org-agenda-time-leading-zero
+ (< t0 1000)) "0" "")
(if (< t0 100) "0" "")
(if (< t0 10) "0" "")
(int-to-string t0))))
next prev parent reply other threads:[~2010-01-20 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 9:51 formatting times as HH:MM with leading zeros Stephen Eglen
2010-01-20 12:59 ` Matt Lundin
2010-01-20 17:29 ` Stephen Eglen
2010-01-20 19:02 ` Carsten Dominik
2010-01-20 20:28 ` Stephen Eglen [this message]
2010-01-21 15:02 ` Carsten Dominik
2010-01-21 15:17 ` Carsten Dominik
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=23017.1264019324@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com \
--to=s.j.eglen@damtp.cam.ac.uk \
--cc=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mdl@imapmail.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).