emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org, Maciek Starzyk <mstarzyk@gmail.com>
Subject: Re: [PATCH] org-table.el: Calc formulas evaluate to #ERROR.
Date: Mon, 04 Jul 2011 10:41:07 +0100	[thread overview]
Message-ID: <87zkkutmbw.fsf@ucl.ac.uk> (raw)
In-Reply-To: <8739im5sxw.fsf@gnu.org> (Bastien's message of "Mon, 04 Jul 2011 10:52:11 +0200")

Bastien <bzg@altern.org> writes:

> Hi Maciek,
>
> Maciek Starzyk <mstarzyk@gmail.com> 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)

  reply	other threads:[~2011-07-04  9:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 23:14 [PATCH] org-table.el: Calc formulas evaluate to #ERROR Maciek Starzyk
2011-07-04  7:47 ` Eric S Fraga
2011-07-04  8:52 ` Bastien
2011-07-04  9:41   ` Eric S Fraga [this message]
2011-07-04 10:25     ` Bastien
2011-07-04 10:38       ` Eric S Fraga
2011-07-04 16:26         ` Achim Gratz
2011-07-04 17:21           ` Eric S Fraga

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=87zkkutmbw.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mstarzyk@gmail.com \
    /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).