From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Symbol's value as variable is void: org-table-modes Date: Mon, 30 Apr 2012 16:55:45 -0400 Message-ID: <11717.1335819345@alphaville> References: <87r4v5j6su.fsf@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOxdR-0003dc-GT for emacs-orgmode@gnu.org; Mon, 30 Apr 2012 16:55:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOxdN-0008OB-Rt for emacs-orgmode@gnu.org; Mon, 30 Apr 2012 16:55:53 -0400 Received: from g4t0014.houston.hp.com ([15.201.24.17]:43378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOxdN-0008O2-L7 for emacs-orgmode@gnu.org; Mon, 30 Apr 2012 16:55:49 -0400 In-Reply-To: Message from Mikkel Kristiansen of "Mon, 30 Apr 2012 22:36:33 +0200." <87r4v5j6su.fsf@gmail.com> 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: Mikkel Kristiansen Cc: emacs-orgmode@gnu.org Mikkel Kristiansen wrote: > Org-mode version 7.8.09 (release_7.8.09-454-g537ab2) > GNU Emacs 23.4.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-04-12 on shirley.hoetzel.info > Arch Linux. > > |-------+----+---+-----+--------| > | A | AA | 2 | 60 | 73.80 | > | B | BB | 5 | 150 | 185.00 | > |-------+----+---+-----+--------| > | Total | - | | | 260.00 | > |-------+----+---+-----+--------| > #+TBLFM: @1$5=vsum($4*1.225);%.2f p20 f20::@2$5=vsum($4*1.225);%.2f p20 f20::@3$5=vsum(@1..@2);%.2f p20 f20 > > I am trying make the spreadsheet above with org-tbl. When running C-u C-c C-c I get this error-message: > "org-table-recalculate: Symbol's value as variable is void: org-table-modes" > > When not using "p20 f20" the spreadsheet works fine, but I need the precision. > > I'm lost on how to fix this issue or how to work around it. Hopefully someone can explain what can be done to make this work. > This is another victim of the global dynamic var renaming patches: ,---- | commit b689cbfb6c4d287d839ac3b0727497e5114995d8 | Author: Bastien Guerry | Date: Fri Mar 30 22:47:18 2012 +0200 | | Fix global dynamic variables in org-table.el. | | Thanks to Martyn Jago for this patch. | | diff --git a/lisp/org-table.el b/lisp/org-table.el | index a523eac..9018bb4 100644 | --- a/lisp/org-table.el | +++ b/lisp/org-table.el | @@ -2364,7 +2364,7 @@ (defun org-table-maybe-recalculate-line () | (looking-at org-table-auto-recalculate-regexp)) | (org-table-recalculate) t)) | | -(defvar modes) | +(defvar org-table-modes) | (defsubst org-set-calc-mode (var &optional value) | (if (stringp var) | (setq var (assoc var '(("D" calc-angle-mode deg) | @@ -2372,10 +2372,10 @@ (defsubst org-set-calc-mode (var &optional value) | ("F" calc-prefer-frac t) | ("S" calc-symbolic-mode t))) | value (nth 2 var) var (nth 1 var))) | - (if (memq var modes) | - (setcar (cdr (memq var modes)) value) | - (cons var (cons value modes))) | - modes) | + (if (memq var org-table-modes) | + (setcar (cdr (memq var org-table-modes)) value) | + (cons var (cons value org-table-modes))) | + org-table-modes) | | (defun org-table-eval-formula (&optional arg equation | suppress-align suppress-const `---- The variable should be called "modes" as far as calc is concerned. Nick