From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [PATCH] org-table.el: Calc formulas evaluate to #ERROR. Date: Mon, 04 Jul 2011 10:41:07 +0100 Message-ID: <87zkkutmbw.fsf@ucl.ac.uk> References: <8739im5sxw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdfeZ-0004zY-MU for emacs-orgmode@gnu.org; Mon, 04 Jul 2011 05:41:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QdfeY-00035H-3H for emacs-orgmode@gnu.org; Mon, 04 Jul 2011 05:41:19 -0400 Received: from vscane-c.ucl.ac.uk ([144.82.108.43]:41029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdfeX-000359-Mw for emacs-orgmode@gnu.org; Mon, 04 Jul 2011 05:41:17 -0400 In-Reply-To: <8739im5sxw.fsf@gnu.org> (Bastien's message of "Mon, 04 Jul 2011 10:52:11 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Maciek Starzyk Bastien writes: > Hi Maciek, > > Maciek Starzyk writes: > >> This fixes regression bug introduced in >> 2e20cf9358deb9579ae6a22bc0deb2a772387194 > > Applied, thanks a lot. Bastien, unfortunately, it does not seem to have been applied quite correctly. The following should correct the latest version: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org-table.el b/lisp/org-table.el index 7f0f9bb..9724dc2 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2513,13 +2513,13 @@ not overwrite the stored one." (error "#ERROR")) ev (if (numberp ev) (number-to-string ev) ev) ev (if duration (org-table-time-seconds-to-string - (string-to-number ev) ev))) + (string-to-number ev)) ev)) (or (fboundp 'calc-eval) (error "Calc does not seem to be installed, and is needed to evaluate the formula")) (setq ev (calc-eval (cons form modes) (if numbers 'num)) ev (if duration (org-table-time-seconds-to-string - (string-to-number ev) ev)))) + (string-to-number ev)) ev))) (when org-table-formula-debug (with-output-to-temp-buffer "*Substitution History*" --8<---------------cut here---------------end--------------->8--- -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 : using Org-mode version 7.5 (release_7.5.567.gb9af1.dirty)