From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: formatting times as HH:MM with leading zeros Date: Thu, 21 Jan 2010 16:02:57 +0100 Message-ID: References: <21605.1263981063@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> <87zl49ue2m.fsf@fastmail.fm> <22692.1264008574@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> <23017.1264019324@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXyYt-00077P-Th for emacs-orgmode@gnu.org; Thu, 21 Jan 2010 10:03:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXyYo-000773-Up for emacs-orgmode@gnu.org; Thu, 21 Jan 2010 10:03:07 -0500 Received: from [199.232.76.173] (port=32883 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXyYo-000770-RO for emacs-orgmode@gnu.org; Thu, 21 Jan 2010 10:03:02 -0500 Received: from gv-out-0910.google.com ([216.239.58.189]:21708) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXyYo-0005nq-8I for emacs-orgmode@gnu.org; Thu, 21 Jan 2010 10:03:02 -0500 Received: by gv-out-0910.google.com with SMTP id n29so6846gve.17 for ; Thu, 21 Jan 2010 07:03:01 -0800 (PST) In-Reply-To: <23017.1264019324@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> 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: Matt Lundin , emacs-orgmode@gnu.org Applied, thanks. - Carsten On Jan 20, 2010, at 9:28 PM, Stephen Eglen wrote: > 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 > > * 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)))) > > - Carsten