[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Re: [ISSUE] Re: [PATCH] lisp/org-agenda.el: Add header to agenda
From: |
Ihor Radchenko |
Subject: |
[PATCH] Re: [ISSUE] Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table |
Date: |
Mon, 09 May 2022 20:38:56 +0800 |
"Christopher M. Miles" <numbchild@gmail.com> writes:
> I tested this commit, it should auto append a newline character after
> ~org-agenda-clock-report-header~. Otherwise the header line will in same line
> with table first line.
Reasonable concern.
The attached patch should fix it.
Best,
Ihor
>From c918d5097af4ca82e381cc7a45efccebadf22e91 Mon Sep 17 00:00:00 2001
Message-Id:
<c918d5097af4ca82e381cc7a45efccebadf22e91.1652099867.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Mon, 9 May 2022 20:35:18 +0800
Subject: [PATCH] org-agenda: Make sure that clock report header has trailing
newline
* lisp/org-agenda.el (org-agenda-list): Add trailing newline to
`org-agenda-clock-report-header' if there is none.
---
lisp/org-agenda.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9d38b889d..3a795ef74 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4486,8 +4486,10 @@ (defun org-agenda-list (&optional arg start-day span
with-hour)
(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))
--
2.35.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Re: [ISSUE] Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table,
Ihor Radchenko <=