emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] insert automatically row number in tables.


From: Bernhard Pröll
Subject: Re: [O] insert automatically row number in tables.
Date: Mon, 7 Mar 2016 13:09:17 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

the following formula will do this for me:

| row | data |
|-----+------|
|   2 | 0303 |
|   3 | 5123 |
|   4 |   41 |
|   5 | 4234 |
|   6 |   34 |
#+TBLFM: address@hidden

Regards,

Bernhard Pröll

On Mon, 07. Mar 11:24, Uwe Brauer wrote:
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]