From: "Bernhard Pröll" <bmutbuerger@gmail.com>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: insert automatically row number in tables.
Date: Mon, 7 Mar 2016 13:09:17 +0100 [thread overview]
Message-ID: <20160307120917.GA8538@gmail.com> (raw)
In-Reply-To: <87io0y1qf6.fsf@mat.ucm.es>
Hi,
the following formula will do this for me:
| row | data |
|-----+------|
| 2 | 0303 |
| 3 | 5123 |
| 4 | 41 |
| 5 | 4234 |
| 6 | 34 |
#+TBLFM: $1=@#
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
>
next prev parent reply other threads:[~2016-03-07 12:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 11:24 insert automatically row number in tables Uwe Brauer
2016-03-07 12:09 ` Bernhard Pröll [this message]
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=20160307120917.GA8538@gmail.com \
--to=bmutbuerger@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=oub@mat.ucm.es \
/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).