From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Fix clock-in with effort and percent complete cookie Date: Sat, 20 Feb 2010 18:06:42 +0100 Message-ID: <5300B66B-05EA-4DC4-ADCE-ED233F81F0F0@gmail.com> References: <1266684443-27473-1-git-send-email-bernt@norang.ca> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NisnA-0007Ie-TG for emacs-orgmode@gnu.org; Sat, 20 Feb 2010 12:06:57 -0500 Received: from [140.186.70.92] (port=48324 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nisn7-0007G2-EF for emacs-orgmode@gnu.org; Sat, 20 Feb 2010 12:06:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nisn4-0002Ja-1X for emacs-orgmode@gnu.org; Sat, 20 Feb 2010 12:06:50 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:33533) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nisn3-0002JV-RI for emacs-orgmode@gnu.org; Sat, 20 Feb 2010 12:06:50 -0500 Received: by ewy28 with SMTP id 28so1148316ewy.8 for ; Sat, 20 Feb 2010 09:06:44 -0800 (PST) In-Reply-To: <1266684443-27473-1-git-send-email-bernt@norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org 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