فهرست منبع

New option to format the total time cells.

* org-clock.el (org-clock-in-prepare-hook): New option to
format the total time cells.
(org-clocktable-write-default): Use the new option.
Bastien Guerry 13 سال پیش
والد
کامیت
7686a81c14
1فایلهای تغییر یافته به همراه11 افزوده شده و 5 حذف شده
  1. 11 5
      lisp/org-clock.el

+ 11 - 5
lisp/org-clock.el

@@ -323,6 +323,12 @@ play with them."
   :version "24.1"
   :version "24.1"
   :type 'boolean)
   :type 'boolean)
 
 
+(defcustom org-clock-total-time-cell-format "*%s*"
+  "Format string for the total time cells."
+  :group 'org-clock
+  :version "24.1"
+  :type 'boolean)
+
 (defvar org-clock-in-prepare-hook nil
 (defvar org-clock-in-prepare-hook nil
   "Hook run when preparing the clock.
   "Hook run when preparing the clock.
 This hook is run before anything happens to the task that
 This hook is run before anything happens to the task that
@@ -2231,11 +2237,11 @@ from the dynamic block definition."
 				         ; file column, maybe
 				         ; file column, maybe
        (if level-p   "|"      "")        ; level column, maybe
        (if level-p   "|"      "")        ; level column, maybe
        (if timestamp "|"      "")        ; timestamp column, maybe
        (if timestamp "|"      "")        ; timestamp column, maybe
-       (if properties (make-string (length properties) ?|) "")  ;properties columns, maybe
-       (concat "*" (nth 7 lwords) "*| ") ; instead of a headline
-       "*"
-       (org-minutes-to-hh:mm-string (or total-time 0)) ; the time
-       "*|\n")                          ; close line
+       (if properties (make-string (length properties) ?|) "")  ; properties columns, maybe
+       (concat (format org-clock-total-time-cell-format (nth 7 lwords))  "| ") ; instead of a headline
+       (format org-clock-total-time-cell-format
+	       (org-minutes-to-hh:mm-string (or total-time 0))) ; the time
+       "|\n")                          ; close line
 
 
       ;; Now iterate over the tables and insert the data
       ;; Now iterate over the tables and insert the data
       ;; but only if any time has been collected
       ;; but only if any time has been collected