[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table
From: |
Nicolas Goaziou |
Subject: |
Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table |
Date: |
Fri, 21 Jan 2022 11:28:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hello,
Samim Pezeshki <p.samim@gmail.com> 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