emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 22e6ed6b89: agenda: Add header to agenda clock repo


From: ELPA Syncer
Subject: [elpa] externals/org 22e6ed6b89: agenda: Add header to agenda clock report table
Date: Wed, 26 Jan 2022 15:57:46 -0500 (EST)

branch: externals/org
commit 22e6ed6b89755047b44f8666ac20aac0c50afc34
Author: Samim Pezeshki <psamim@gmail.com>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    agenda: Add header to agenda clock report table
    
    * lisp/org-agenda.el (org-agenda-list): Add header to agenda clock
    report table.
    
    TINYCHANGE
---
 doc/org-manual.org |  4 ++--
 etc/ORG-NEWS       |  1 +
 lisp/org-agenda.el | 11 +++++++++++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index b4c20f2528..2c54fde873 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -9742,8 +9742,8 @@ the other commands, point needs to be in the desired line.
   variable ~org-agenda-start-with-clockreport-mode~.  By using
   a prefix argument when toggling this mode (i.e., {{{kbd(C-u R)}}}),
   the clock table does not show contributions from entries that are
-  hidden by agenda filtering[fn:99].  See also the variable
-  ~org-clock-report-include-clocking-task~.
+  hidden by agenda filtering[fn:99].  See also the variables
+  ~org-clock-report-include-clocking-task~ and 
~org-agenda-clock-report-header~.
 
 - {{{kbd(v c)}}} ::
 
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 335db4139a..5a94e737e7 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -140,6 +140,7 @@ introduced which will accept three new formats:
 Chmod-style permissions are based on the new variable
 ~org-babel-tangle-default-file-mode~.
 
+*** A new custom setting =org-agenda-clock-report-header= to add a header to 
org agenda clock report
 * Version 9.5
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 607cf7d22c..3a6a4c1b96 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1219,6 +1219,15 @@ For example, 9:30am would become 09:30 rather than  
9:30."
   :version "24.1"
   :type 'boolean)
 
+(defcustom org-agenda-clock-report-header nil
+  "Header for org agenda clock report mode"
+  :group 'org-agenda
+  :type '(choice
+    (string :tag "Header")
+    (const :tag "No header" nil))
+  :safe #'stringp
+  :package-version '(Org . "9.6"))
+
 (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)))
@@ -4475,6 +4484,8 @@ 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)))
          (insert tbl)))
       (goto-char (point-min))
       (or org-agenda-multi (org-agenda-fit-window-to-buffer))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]