Thanks everyone for replying!

I made one mistake before posting that question: I should have looked up
C-h f org-table-recalculate. And now I did :)
I should have done "C-u C-c * " when the point was in the table (I was
doing just C-c *, which evaluates only the current row).

>> Derek
> | N |   |
> |---+---|
> |   |   |
> |   |   |
> |   |   |
> |   |   |
> #+TBLFM: @3$1..@>$1=@-1 + 1::@2$1=1

Thanks Derek! That worked! btw I was a bit perplexed looking at your
solution because it showed "<at>" instead of "@" :)

> One problem is that $1 also includes the first row with the "N" heading.
> that is why in your example the second and third lines both will at first
> contain 1 (at least with my org version 8.3.3), and in the second
iteration
> only show the correct series.

I just learned that doing "C-u C-u C-c C-c" or "C-u C-u C-c *" with the
point anywhere on the table, keeps re-evaluating the whole table till the
values are stable. (NOTE that these do not work when point is on the
#+TBLFM line; the point HAS to be inside the table).

So the original example also works just fine if I use C-u C-u C-c C-c

| N |   |
|---+---|
|   |   |
|   |   |
|   |   |
|   |   |
#+TBLFM: $1=@-1+1::@2$1=1

>> Dieter

Thanks! Your solution works too, with C-u C-c C-c anywhere in the table.

| N |
|---|
|   |
|   |
|   |
|   |
#+TBLFM: $1=@#-1

That said, can someone please update that FAQ at
http://orgmode.org/worg/org-faq.html#fill-table-column-with-incremental-numbers
It would be great to mention C-u C-c C-c and C-u C-u C-c C-c in that
solution too.

Reply via email to