Skip to content

Commit

Permalink
org-agenda: Make sure that clock report header has trailing newline
Browse files Browse the repository at this point in the history
* lisp/org-agenda.el (org-agenda-list): Add trailing newline to
`org-agenda-clock-report-header' if there is none.
  • Loading branch information
yantar92 committed Jul 11, 2022
1 parent c231e93 commit 53e6aa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lisp/org-agenda.el
Original file line number Diff line number Diff line change
Expand Up @@ -4502,8 +4502,10 @@ items if they have an hour specification like [h]h:mm."
(setq p (plist-put p :tend clocktable-end))
(setq p (plist-put p :scope 'agenda))
(setq tbl (apply #'org-clock-get-clocktable p))
(when org-agenda-clock-report-header
(insert (propertize org-agenda-clock-report-header 'face 'org-agenda-structure)))
(when org-agenda-clock-report-header
(insert (propertize org-agenda-clock-report-header 'face 'org-agenda-structure))
(unless (string-suffix-p "\n" org-agenda-clock-report-header)
(insert "\n")))
(insert tbl)))
(goto-char (point-min))
(or org-agenda-multi (org-agenda-fit-window-to-buffer))
Expand Down

0 comments on commit 53e6aa8

Please sign in to comment.