[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [PATCH] Fix clock-in with effort and percent complete cook
Re: [Orgmode] [PATCH] Fix clock-in with effort and percent complete cookie
Sat, 20 Feb 2010 18:06:42 +0100
On Feb 20, 2010, at 5:47 PM, Bernt Hansen wrote:
Fixes Lisp error: (error "Not enough arguments for format string")
task to be clocked in has both a % in the heading due to the [%]
cookie and an effort.
I had a task "Update environment [90%]" that triggered this error
contained an effort estimate. This commit is available at
lisp/org-clock.el | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 6e895bf..e3866be 100644
@@ -405,8 +405,8 @@ pointing to it."
"Number of seconds between mode line clock string updates.")
(defun org-clock-get-clock-string ()
- "Form a clock-string, that will be show in the mode line.
-If an effort estimate was defined for current item, use
+ "Form a clock-string, that will be shown in the mode line.
+If an effort estimate was defined for the current item, use
01:30/01:50 format (clocked/estimated).
If not, show simply the clocked time like 01:50."
(let* ((clocked-time (org-clock-get-clocked-time))
@@ -425,7 +425,7 @@ If not, show simply the clocked time like 01:50."
(effort-str (format org-time-clocksum-format effort-h effort-
(concat "[%s/" effort-str
- "] (" org-clock-heading ")")
+ "] (" (replace-regexp-in-string "%" "%%" org-clock-heading)
(format clockstr work-done-str))
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.