emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug in TBLFM
@ 2009-02-11 15:43 Giovanni Ridolfi
  2009-02-13  9:05 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Ridolfi @ 2009-02-11 15:43 UTC (permalink / raw)
  To: org-mode mailing list

Hi, everybody,

Org-mode version 6.22b
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON

I found an unexpected behaviour, a bug ?, in TBLFM 
(well I've already reported it in 
http://lists.gnu.org/archive/html/emacs-orgmode/2009-01/msg00252.html 
but I didn't provide a report clear enough;
ah, the importance of proper bug reports ;-)

table (from manual):

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

BUG :
A column can't be referred with its name, 
if it is left hand side of a formula.

(Please try changing $6 with $Tot in the first formula )

Well I don't know if this is a bug or a constrain in
the implementation.
This being the case I think it should be 
documented in the manual in the section (Field formulas) like:
"The left hand side of a formula may also be a named field,
but not a named column"

cheers,
Giovanni



      Passa a Yahoo! Mail.

La webmail che ti offre GRATIS spazio illimitato, 
antispam e messenger integrato.
http://it.mail.yahoo.com/              

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

* Re: bug in TBLFM
  2009-02-11 15:43 bug in TBLFM Giovanni Ridolfi
@ 2009-02-13  9:05 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-02-13  9:05 UTC (permalink / raw)
  To: giovanni.ridolfi; +Cc: org-mode mailing list


On Feb 11, 2009, at 4:43 PM, Giovanni Ridolfi wrote:

> Hi, everybody,
>
> Org-mode version 6.22b
> GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
>
> I found an unexpected behaviour, a bug ?, in TBLFM
> (well I've already reported it in
> http://lists.gnu.org/archive/html/emacs-orgmode/2009-01/msg00252.html
> but I didn't provide a report clear enough;
> ah, the importance of proper bug reports ;-)
>
> table (from manual):
>
> |---+---------+--------+--------+--------+-------+------|
> |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
> |---+---------+--------+--------+--------+-------+------|
> | ! |         |     P1 |     P2 |     P3 |   Tot |      |
> | # | Maximum |     12 |     15 |     25 |       | 52.0 |
> | ^ |         |     m1 |     m2 |     m3 |    mt |      |
> |---+---------+--------+--------+--------+-------+------|
> | # | Peter   |     10 |      8 |     23 |       | 41.0 |
> | # | Sam     |      2 |      4 |      3 |       |  9.0 |
> |---+---------+--------+--------+--------+-------+------|
> |   | Average |        |        |        |  25.0 |      |
> | ^ |         |        |        |        |    at |      |
> | $ | max=10  |        |        |        |       |      |
> |---+---------+--------+--------+--------+-------+------|
> #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@- 
> I);%.1f
>
> BUG :
> A column can't be referred with its name,
> if it is left hand side of a formula.
>
> (Please try changing $6 with $Tot in the first formula )
>
> Well I don't know if this is a bug or a constrain in
> the implementation.
> This being the case I think it should be
> documented in the manual in the section (Field formulas) like:
> "The left hand side of a formula may also be a named field,
> but not a named column"

I have documented this limitation, thanks for the report.

- Carsten

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

end of thread, other threads:[~2009-02-13  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-11 15:43 bug in TBLFM Giovanni Ridolfi
2009-02-13  9:05 ` Carsten Dominik

Code repositories for project(s) associated with this 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).