[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:55:53 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Mar 18, 11:24 pm, Bastien <b...@altern.org> wrote:
> poppyer <popp...@gmail.com> writes:
> >> 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 ;N is not required here, this is for Calc formulas only.)
>
> > 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 ..."
>
> Yes, that's a problem. This is because when looking for a relative
> reference, if Org encounters a non-number row, it falls back on the next
> row in the same column... I'll send a bug report to Carsten for this.
>
> > Any idea to exclude the first "1" without being updated?
>
> If you don't really need to compute the first column you can always
> use a dummy macro like this one:
>
> C-a f3 | C-xC-kC-i | | C-j f4
>
> Then use it with C-x e e e e as many times as you want rows...
Even easier is this:
Put a 1 into the first field, and press S-RET to fill the column with
increasing numbers.
As Bastien says, this will not recompute when you add or remove lines.
- Carsten