From df5c35bd84e1d343c52c605c2c77393fb11ad590 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Mon, 4 Oct 2021 15:45:16 +0800 Subject: [PATCH] org-agenda: Make sure that time grid is aligned when hour <10 * lisp/org-agenda.el (org-agenda-format-item): Make sure that hour part of begin time in time grid always occupy 5 chars Fixes https://list.orgmode.org/orgmode/3afe1bba.2f48.17c350d0a41.Coremail.tumashu@163.com/ --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 354f40867..e20d0225f 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6765,7 +6765,7 @@ (defvar level) (defvar tag) (defvar time)) (setq duration (- (org-duration-to-minutes s2) (org-duration-to-minutes s1)))) ;; Format S1 and S2 for display. - (when s1 (setq s1 (org-get-time-of-day s1 'overtime))) + (when s1 (setq s1 (format "%05s" (org-get-time-of-day s1 'overtime)))) (when s2 (setq s2 (org-get-time-of-day s2 'overtime)))) (when (string-match org-tag-group-re txt) ;; Tags are in the string -- 2.32.0