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/
This commit is contained in:
Ihor Radchenko 2021-10-04 15:45:16 +08:00
parent 7ec9e37117
commit 85aaa19908
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -6765,7 +6765,7 @@ Any match of REMOVE-RE will be removed from TXT."
(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 "%5s" (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