emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix clock-in with effort and percent complete cookie
Date: Sat, 20 Feb 2010 18:06:42 +0100	[thread overview]
Message-ID: <5300B66B-05EA-4DC4-ADCE-ED233F81F0F0@gmail.com> (raw)
In-Reply-To: <1266684443-27473-1-git-send-email-bernt@norang.ca>

Applied, thanks.

- Carsten
On Feb 20, 2010, at 5:47 PM, Bernt Hansen wrote:

> Fixes Lisp error: (error "Not enough arguments for format string")  
> when the
> 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  
> when it
> contained an effort estimate.  This commit is available at
> git://git.norang.ca/org-mode for-carsten
>
> 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
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -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- 
> m))
> 	       (clockstr (org-propertize
> 			  (concat  "[%s/" effort-str
> -				   "] (" org-clock-heading ")")
> +				   "] (" (replace-regexp-in-string "%" "%%" org-clock-heading)  
> ")")
> 			  'face 'org-mode-line-clock)))
> 	  (format clockstr work-done-str))
>       (org-propertize (format
> -- 
> 1.7.0.14.g7e948
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

      reply	other threads:[~2010-02-20 17:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-20 16:47 [PATCH] Fix clock-in with effort and percent complete cookie Bernt Hansen
2010-02-20 17:06 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5300B66B-05EA-4DC4-ADCE-ED233F81F0F0@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).