emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] insert automatically row number in tables.


From: Uwe Brauer
Subject: [O] insert automatically row number in tables.
Date: Mon, 07 Mar 2016 11:24:45 +0000
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/25.1.50 (gnu/linux)

Hi

I would like to insert row in a table, and then hitting C-c C-c, the
leftmost column gets filled by the row number.

Such as in


| row | data |
|-----+------|
|     | 0303 |
|     | 5123 |
|     |   41 |
|     | 4234 |
#+TBLFM: magic command

C-c C-c

gives


| row | data |
|-----+------|
| 2   | 0303 |
| 3   | 5123 |
| 4   | 41   |
| 5   | 4234 |
#+TBLFM: magic command

Then
| row | data |
|-----+------|
|   2 | 0303 |
|   3 | 5123 |
|   4 |   41 |
|   5 | 4234 |
|     |   17 |
#+TBLFM: magic command

C-c C-c

gives

| row | data |
|-----+------|
|   2 | 0303 |
|   3 | 5123 |
|   4 |   41 |
|   5 | 4234 |
|   6 |   17 |
#+TBLFM: magic command


I googled around and found solutions such as:

https://stackoverflow.com/questions/9267050/how-to-achieve-a-row-index-column-in-emacs-org-mode-using-a-calc-column-rule

Or
https://lists.gnu.org/archive/html/emacs-orgmode/2008-08/msg00054.html

But none of them worked for me the way I described it.

Any comments or help?

thanks

Uwe Brauer 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]