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.
Samim Pezeshki
writes:
> Thanks Nicolas for reviewing the changes!
>
> I applied the changes.
> Attached is the updated patch.
>
> On Fri, Jan 21, 2022 at 1:58 PM Nicolas Goaziou wrote:
>
> Hello,
>
> Samim Pezeshki writes:
>
> > +(defcustom org-agenda-clock-report-header nil
> > + "Header for org agenda clock report mode"
> > + :group 'org-agenda
> > + :type 'string)
>
> Please add :package-version and :safe keywords to the definition.
>
> Also, type does not match the default value. You probably mean
>
> (choice
> (string :tag "Header")
> (const :tag "No header" nil))
>
> > +
> > (defun org-agenda-time-of-day-to-ampm (time)
> > "Convert TIME of a string like \"13:45\" to an AM/PM style time string."
> > (let* ((hour-number (string-to-number (substring time 0 -3)))
> > @@ -4473,6 +4478,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
> > + (put-text-property 0 (length org-agenda-clock-report-header) 'face 'org-agenda-structure
> > + org-agenda-clock-report-header)
> > + (insert org-agenda-clock-report-header))
>
> Maybe:
>
> (insert (propertize org-agenda-clock-report-header 'face 'org-agenda-structure))
>
> Could you send an updated patch?
>
> Regards,
> --
> Nicolas Goaziou
>
> [4. text/x-patch; 0001-lisp-org-agenda.el-Add-header-to-agenda-clock-report.patch]...
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3