emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Update tables 8.3.1
@ 2015-08-08 17:41 Scott Randby
  2015-08-08 21:18 ` Rasmus
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Randby @ 2015-08-08 17:41 UTC (permalink / raw)
  To: emacs-org list

I'm beginning to wonder if upgrading to 8.3.1 is a mistake. I had no 
trouble at all with 8.2.10, but many problems with 8.3.1. My latest 
issue follows.

When I update a table (using C-u C-c *, or C-u C-c C-c, or M-x 
org-table-recalculate), the table doesn't update and I get the following 
error message:

   Wrong type argument: number-or-marker-p, (4)

The number in parentheses varies depending on the table. Here are two 
examples of table formulas I have, formulas which worked perfectly until 
I upgraded to 8.3.1:

   #+TBLFM: $tot=vsum(@<<..@>>>);%.2f

   #+TBLFM: $13=vsum($3..$12);%.1f::$qs=$q1+$q2;%.1f

I can provide example tables if necessary.

I tried the example table given in section 3.5.10 of the documentation 
and I get the same error.

|---+---------+--------+--------+--------+-------+------|
|   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
|---+---------+--------+--------+--------+-------+------|
| ! |         |     P1 |     P2 |     P3 |   Tot |      |
| # | Maximum |     10 |     15 |     25 |    50 | 10.0 |
| ^ |         |     m1 |     m2 |     m3 |    mt |      |
|---+---------+--------+--------+--------+-------+------|
| # | Peter   |     10 |      8 |     23 |    41 |  8.2 |
| # | Sam     |      2 |      4 |      3 |     9 |  1.8 |
|---+---------+--------+--------+--------+-------+------|
|   | Average |        |        |        |  25.0 |      |
| ^ |         |        |        |        |    at |      |
| $ | max=50  |        |        |        |       |      |
|---+---------+--------+--------+--------+-------+------|
#+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f

Error message: Wrong type argument: number-or-marker-p, (6)

I will appreciate any help with this issue. If it can't be fixed, I will 
have to downgrade to 8.2.10.

Scott Randby

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

* Re: Update tables 8.3.1
  2015-08-08 17:41 Update tables 8.3.1 Scott Randby
@ 2015-08-08 21:18 ` Rasmus
  2015-08-08 23:15   ` Scott Randby
  2015-08-09  0:15   ` Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Rasmus @ 2015-08-08 21:18 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi Scott,

Scott Randby <srandby@gmail.com> writes:

> I'm beginning to wonder if upgrading to 8.3.1 is a mistake. I had no 
> trouble at all with 8.2.10, but many problems with 8.3.1. My latest 
> issue follows.

We appreciate your bug reports.  If you have got the time, please keep
testing Org 8.3 and let us know about errors you find.

> When I update a table (using C-u C-c *, or C-u C-c C-c, or M-x 
> org-table-recalculate), the table doesn't update and I get the following 
> error message:
>
>    Wrong type argument: number-or-marker-p, (4)

I see this as well.

> I can provide example tables if necessary.

The example below is sufficient. 

> I tried the example table given in section 3.5.10 of the documentation 
> and I get the same error.
>
> |---+---------+--------+--------+--------+-------+------|
> |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
> |---+---------+--------+--------+--------+-------+------|
> | ! |         |     P1 |     P2 |     P3 |   Tot |      |
> | # | Maximum |     10 |     15 |     25 |    50 | 10.0 |
> | ^ |         |     m1 |     m2 |     m3 |    mt |      |
> |---+---------+--------+--------+--------+-------+------|
> | # | Peter   |     10 |      8 |     23 |    41 |  8.2 |
> | # | Sam     |      2 |      4 |      3 |     9 |  1.8 |
> |---+---------+--------+--------+--------+-------+------|
> |   | Average |        |        |        |  25.0 |      |
> | ^ |         |        |        |        |    at |      |
> | $ | max=50  |        |        |        |       |      |
> |---+---------+--------+--------+--------+-------+------|
>
> #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f
>
> Error message: Wrong type argument: number-or-marker-p, (6)
>
> I will appreciate any help with this issue. If it can't be fixed, I will 
> have to downgrade to 8.2.10.

Can you try the attached patch?  It seems to work on the example from the
manual, but you likely have more straining examples at hand.

Thanks,
Rasmus

-- 
Enough with the bla bla!

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-table-Fix-typo.patch --]
[-- Type: text/x-diff, Size: 838 bytes --]

From 5fbcbffea86757e068a866643f3e7470dae1e10f Mon Sep 17 00:00:00 2001
From: Rasmus <rasmus@gmx.us>
Date: Sat, 8 Aug 2015 23:11:39 +0200
Subject: [PATCH 1/5] org-table: Fix typo

* org-table.el (org-table-goto-field): Fix typo.
---
 lisp/org-table.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 62de402..ef6427c 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2567,7 +2567,7 @@ This function assumes the table is already analyzed (i.e., using
 		  (string-to-number (match-string 2 ref))))
 	   (t (user-error "Unknown field: %s" ref))))
 	 (line (car coordinates))
-	 (column (cdr coordinates))
+	 (column (cadr coordinates))
 	 (create-new-column (if (functionp create-column-p)
 				(funcall create-column-p column)
 			      create-column-p)))
-- 
2.5.0


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

* Re: Update tables 8.3.1
  2015-08-08 21:18 ` Rasmus
@ 2015-08-08 23:15   ` Scott Randby
  2015-08-09  0:15   ` Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Scott Randby @ 2015-08-08 23:15 UTC (permalink / raw)
  To: emacs-orgmode

On 08/08/2015 05:18 PM, Rasmus wrote:
> Hi Scott,
>
> Scott Randby <srandby@gmail.com> writes:
>
>> I'm beginning to wonder if upgrading to 8.3.1 is a mistake. I had no
>> trouble at all with 8.2.10, but many problems with 8.3.1. My latest
>> issue follows.
>
> We appreciate your bug reports.  If you have got the time, please keep
> testing Org 8.3 and let us know about errors you find.
>
>> When I update a table (using C-u C-c *, or C-u C-c C-c, or M-x
>> org-table-recalculate), the table doesn't update and I get the following
>> error message:
>>
>>     Wrong type argument: number-or-marker-p, (4)
>
> I see this as well.
>
>> I can provide example tables if necessary.
>
> The example below is sufficient.
>
>> I tried the example table given in section 3.5.10 of the documentation
>> and I get the same error.
>>
>> |---+---------+--------+--------+--------+-------+------|
>> |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
>> |---+---------+--------+--------+--------+-------+------|
>> | ! |         |     P1 |     P2 |     P3 |   Tot |      |
>> | # | Maximum |     10 |     15 |     25 |    50 | 10.0 |
>> | ^ |         |     m1 |     m2 |     m3 |    mt |      |
>> |---+---------+--------+--------+--------+-------+------|
>> | # | Peter   |     10 |      8 |     23 |    41 |  8.2 |
>> | # | Sam     |      2 |      4 |      3 |     9 |  1.8 |
>> |---+---------+--------+--------+--------+-------+------|
>> |   | Average |        |        |        |  25.0 |      |
>> | ^ |         |        |        |        |    at |      |
>> | $ | max=50  |        |        |        |       |      |
>> |---+---------+--------+--------+--------+-------+------|
>>
>> #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f
>>
>> Error message: Wrong type argument: number-or-marker-p, (6)
>>
>> I will appreciate any help with this issue. If it can't be fixed, I will
>> have to downgrade to 8.2.10.
>
> Can you try the attached patch?  It seems to work on the example from the
> manual, but you likely have more straining examples at hand.

I applied the patch, and tried it on several tables which have simple 
and complex formulas. It works on those tables. Thanks for your help.

Scott

>
> Thanks,
> Rasmus
>

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

* Re: Update tables 8.3.1
  2015-08-08 21:18 ` Rasmus
  2015-08-08 23:15   ` Scott Randby
@ 2015-08-09  0:15   ` Nicolas Goaziou
  1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2015-08-09  0:15 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Hello,

Rasmus <rasmus@gmx.us> writes:

> Can you try the attached patch?  It seems to work on the example from the
> manual, but you likely have more straining examples at hand.

Thank you. 

I pushed a similar patch in maint
(46f3f4c626d6dfe48c0101e3c994a929b542ba77).


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2015-08-09  0:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-08 17:41 Update tables 8.3.1 Scott Randby
2015-08-08 21:18 ` Rasmus
2015-08-08 23:15   ` Scott Randby
2015-08-09  0:15   ` Nicolas Goaziou

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