emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Symbol's value as variable is void: org-table-modes
@ 2012-04-30 20:36 Mikkel Kristiansen
  2012-04-30 20:55 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Mikkel Kristiansen @ 2012-04-30 20:36 UTC (permalink / raw)
  To: emacs-orgmode

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. 

/Mikkel Kristiansen

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Symbol's value as variable is void: org-table-modes
  2012-04-30 20:36 Symbol's value as variable is void: org-table-modes Mikkel Kristiansen
@ 2012-04-30 20:55 ` Nick Dokos
  2012-04-30 21:28   ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2012-04-30 20:55 UTC (permalink / raw)
  To: Mikkel Kristiansen; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Symbol's value as variable is void: org-table-modes
  2012-04-30 20:55 ` Nick Dokos
@ 2012-04-30 21:28   ` Nick Dokos
  2012-04-30 23:43     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2012-04-30 21:28 UTC (permalink / raw)
  To: Mikkel Kristiansen, emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> wrote:

> 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.

Not quite - calc has nothing to do with this. org-table-eval-formula uses
"modes" and has to be fixed: all instances of the "modes" variable
must be renamed to org-table-modes.

Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Symbol's value as variable is void: org-table-modes
  2012-04-30 21:28   ` Nick Dokos
@ 2012-04-30 23:43     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2012-04-30 23:43 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Mikkel Kristiansen

Nick Dokos <nicholas.dokos@hp.com> writes:

> Not quite - calc has nothing to do with this. org-table-eval-formula uses
> "modes" and has to be fixed: all instances of the "modes" variable
> must be renamed to org-table-modes.

Fixed.

Thanks to Mikkel for reporting this and to you for the fix!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-30 23:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30 20:36 Symbol's value as variable is void: org-table-modes Mikkel Kristiansen
2012-04-30 20:55 ` Nick Dokos
2012-04-30 21:28   ` Nick Dokos
2012-04-30 23:43     ` Bastien

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).