emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Maciek Starzyk <mstarzyk@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-table.el: Calc formulas evaluate to #ERROR.
Date: Mon, 4 Jul 2011 01:14:51 +0200	[thread overview]
Message-ID: <CAE9aC8Ubn7ehus0_z86JpT8f+AOLWPwC2x5tzCrQCpz6o1XXzA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]

This fixes regression bug introduced in
2e20cf9358deb9579ae6a22bc0deb2a772387194

diff --git a/lisp/org-table.el b/lisp/org-table.el
index a7fc863..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))))
+                   (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)))))
+                 (string-to-number ev)) ev)))

     (when org-table-formula-debug
       (with-output-to-temp-buffer "*Substitution History*"


-- 
Maciek Starzyk

[-- Attachment #2: Type: text/html, Size: 1175 bytes --]

             reply	other threads:[~2011-07-03 23:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-03 23:14 Maciek Starzyk [this message]
2011-07-04  7:47 ` [PATCH] org-table.el: Calc formulas evaluate to #ERROR Eric S Fraga
2011-07-04  8:52 ` Bastien
2011-07-04  9:41   ` Eric S Fraga
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=CAE9aC8Ubn7ehus0_z86JpT8f+AOLWPwC2x5tzCrQCpz6o1XXzA@mail.gmail.com \
    --to=mstarzyk@gmail.com \
    --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).