From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: insert automatically row number in tables.
Date: Mon, 07 Mar 2016 11:24:45 +0000 [thread overview]
Message-ID: <87io0y1qf6.fsf@mat.ucm.es> (raw)
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
next reply other threads:[~2016-03-07 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 11:24 Uwe Brauer [this message]
2016-03-07 12:09 ` insert automatically row number in tables Bernhard Pröll
2016-03-07 13:04 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87io0y1qf6.fsf@mat.ucm.es \
--to=oub@mat.ucm.es \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).