[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto incremental columns in table of org-mode?
From: |
drostekirsten |
Subject: |
Re: auto incremental columns in table of org-mode? |
Date: |
Wed, 19 Mar 2008 02:52:55 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Mar 18, 9:57 pm, poppyer <popp...@gmail.com> wrote:
> Bastien <b...@altern.org> writes:
> > poppyer <popp...@gmail.com> writes:
>
> >> I am using orgtbl-mode minor mode, basically as following:
>
> >> | k | n | f(n,k) |
> >> |---+-----+--------|
> >> | 1 | 100 | |
> >> | 2 | | |
> >> | 3 | | |
> >> | | | |
> >> | | | |
> >> | | | |
>
> >> My question is how can I fill the k column when I add rows?
>
> > I would define a formula for this table.
>
> > #+TBLFM: $1='(1+ @-1);N
>
> > This basically says: for the each cell in the first column, compute the
> > value of the cell by adding 1 to the value of the cell above.
>
> I am using similar $1=@-1+1;N
> The problem is, it works at the first time. But every time you use C-u
> C-c C-c to update the whole table. The whole $1 column increase by 1.
> i.e. "1 2 3 ... " ===> "2 3 4 ..."
> Any idea to exclude the first "1" without being updated?
>
Yes, by defining a field formula for just this field:
#+TBLFM: $1=@-1+1::@2$1=1
Field formulas overrule column formulas.
- Carsten