emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Mikkel Kristiansen <mester.kristiansen@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Symbol's value as variable is void: org-table-modes
Date: Mon, 30 Apr 2012 16:55:45 -0400	[thread overview]
Message-ID: <11717.1335819345@alphaville> (raw)
In-Reply-To: Message from Mikkel Kristiansen <mester.kristiansen@gmail.com> of "Mon, 30 Apr 2012 22:36:33 +0200." <87r4v5j6su.fsf@gmail.com>

Mikkel Kristiansen <mester.kristiansen@gmail.com> 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 <bzg@altern.org>
| 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

  reply	other threads:[~2012-04-30 20:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 20:36 Symbol's value as variable is void: org-table-modes Mikkel Kristiansen
2012-04-30 20:55 ` Nick Dokos [this message]
2012-04-30 21:28   ` Nick Dokos
2012-04-30 23:43     ` Bastien

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=11717.1335819345@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mester.kristiansen@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).