emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Guido Van Hoecke <guivho@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Unexpected relative reference behaviour
Date: Thu, 09 May 2013 11:04:30 +0200	[thread overview]
Message-ID: <m2ppx0y15t.fsf@gmail.com> (raw)

Hi,

Using this table

| Grand total      | 19.55 |    |
|------------------+-------+----|
| <2013-05-09 Thu> |  1.23 | v2 |
| <2013-05-04 Sat> |  5.76 | v1 |
| <2013-05-14 Tue> |  3.78 | v1 |
| <2013-04-24 Wed> |  8.78 | v2 |
#+TBLFM: @1$2=vsum(@I..@>);%.2f

I want the formula to be relative to the first hline so, according to
the manual, it should be possible to change @1$2 into @I-1$2

| Grand total      | 19.55 |    |
|------------------+-------+----|
| <2013-05-09 Thu> |  1.23 | v2 |
| <2013-05-04 Sat> |  5.76 | v1 |
| <2013-05-14 Tue> |  3.78 | v1 |
| <2013-04-24 Wed> |  8.78 | v2 |
#+TBLFM: @I-1$2=vsum(@I..@>);%.2f

But this produces very strange results.
Hitting C-c * with the cursor in @>$2 produces:

| Grand total      | 19.55 |    |
|------------------+-------+----|
| <2013-05-09 Thu> |  1.23 | v2 |
| <2013-05-04 Sat> |  5.76 | v1 |
| <2013-05-14 Tue> |  3.78 | v1 |
| 2939977.00       | 19.55 | v2 |
#+TBLFM: @I-1$2=vsum(@I..@>);%.2f

Why does it change <2013-04-24 Wed> into 2939977.0, and 8.78 into 19.55?

Hitting C-u C-c * with the cursor in @>$2 messes up the complete table
and results in:
|       0.00 |  30.32 |    |
|------------+--------+----|
|       0.00 |  30.32 | v2 |
| 4409973.00 |  59.41 | v1 |
|       0.00 | 113.06 | v1 |
| 7349950.00 | 222.34 | v2 |
#+TBLFM: @I-1$2=vsum(@I..@>);%.2f

Am I correct to assume that this is at least unexpected, and probably
erroneous behaviour?


Guido

--
"Consider a spherical bear, in simple harmonic motion..."
		-- Professor in the UCB physics department

             reply	other threads:[~2013-05-09  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09  9:04 Guido Van Hoecke [this message]
2013-05-10  6:33 ` Unexpected relative reference behaviour Carsten Dominik
2013-05-10  9:10   ` Guido Van Hoecke

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=m2ppx0y15t.fsf@gmail.com \
    --to=guivho@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).