emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Tassilo Horn <tassilo@member.fsf.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Spreadsheet question
Date: Thu, 4 Dec 2008 09:06:18 +0100	[thread overview]
Message-ID: <6BD7F784-D3F6-4953-9156-11A9F3136B72@uva.nl> (raw)
In-Reply-To: <87abbdc58q.fsf@thinkpad.tsdh.de>

Hi Tassilo,

@-1 references the row above the current.  If that is a hline, if  
actually
references the current line.

So you are asking Org-mode to sum lines 2 - 6, which includes the  
result line.  So each time the calculation is done, it add the two  
ones to the result from the previous calculation.

- Carsten

On Dec 3, 2008, at 10:34 PM, Tassilo Horn wrote:

> Hi all,
>
> I have this table:
>
> | header |
> |--------|
> |      1 |
> |      1 |
> |--------|
> |      0 |
> #+TBLFM: @4$1=vsum(@2..@-1)
>
> The cell containing 0 should sum up all values of the column's rows
> above.  But C-u C-c C-c gives 2, then 4, then 6, then 8...
>
> Reading the docs I found out that @-1 won't cross hlines, so now I use
> -I instead which works.  But still I don't understand the @-1  
> behavior.
> Even if knowing that it doesn't cross hlines I'd expect it to  
> calculate
> the correct value or at least error because there's no row above @4
> before the next hline.  So why is (equal @-1 @0) here?
>
> Bye,
> Tassilo
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2008-12-04  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 21:34 Spreadsheet question Tassilo Horn
2008-12-04  8:06 ` Carsten Dominik [this message]
2008-12-04 10:49   ` Tassilo Horn
2008-12-05  7:26     ` Carsten Dominik
2008-12-05 12:23       ` Carsten Dominik

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=6BD7F784-D3F6-4953-9156-11A9F3136B72@uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=tassilo@member.fsf.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).