From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trevor Murphy Subject: [PATCH] Timestamps: Handle sub-10-min ranges when updating timestamps Date: Wed, 31 Jul 2013 21:48:52 -0400 Message-ID: <1375321732-26199-1-git-send-email-trevor.m.murphy@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4i0p-0006lO-LW for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 21:49:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4i0h-0007Nm-7q for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 21:49:07 -0400 Received: from mail-gh0-x236.google.com ([2607:f8b0:4002:c05::236]:61986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4i0h-0007Nb-2Y for emacs-orgmode@gnu.org; Wed, 31 Jul 2013 21:48:59 -0400 Received: by mail-gh0-f182.google.com with SMTP id z15so47995ghb.27 for ; Wed, 31 Jul 2013 18:48:58 -0700 (PDT) Received: from localhost.localdomain (z65-50-91-81.ips.direcpath.com. [65.50.91.81]) by mx.google.com with ESMTPSA id x52sm1069251yhh.18.2013.07.31.18.48.56 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 18:48:56 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * lisp/org.el (org-get-compact-tod): Pad with "0" if # of minutes is less than 10. TINYCHANGE --- lisp/org.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 26e653f..89e023c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16088,9 +16088,12 @@ with the current time without prompting the user." (if (not t2) t1 (setq dh (- h2 h1) dm (- m2 m1)) - (if (< dm 0) (setq dm (+ dm 60) dh (1- dh))) + (when (< dm 0) (setq dm (+ dm 60) dh (1- dh))) (concat t1 "+" (number-to-string dh) - (if (/= 0 dm) (concat ":" (number-to-string dm)))))))) + (when (/= 0 dm) (concat ":" + (if (< dm 10) + (concat "0" (number-to-string dm)) + (number-to-string dm))))))))) (defun org-time-stamp-inactive (&optional arg) "Insert an inactive time stamp. -- 1.8.3.4