From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernhard =?iso-8859-1?Q?Pr=F6ll?= Subject: Re: insert automatically row number in tables. Date: Mon, 7 Mar 2016 13:09:17 +0100 Message-ID: <20160307120917.GA8538@gmail.com> References: <87io0y1qf6.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1actyB-0002hr-4D for emacs-orgmode@gnu.org; Mon, 07 Mar 2016 07:09:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acty7-0007Ll-UG for emacs-orgmode@gnu.org; Mon, 07 Mar 2016 07:09:03 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acty7-0007LY-NL for emacs-orgmode@gnu.org; Mon, 07 Mar 2016 07:08:59 -0500 Received: by mail-wm0-x22d.google.com with SMTP id l68so82830420wml.0 for ; Mon, 07 Mar 2016 04:08:59 -0800 (PST) Content-Disposition: inline In-Reply-To: <87io0y1qf6.fsf@mat.ucm.es> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Uwe Brauer Cc: emacs-orgmode@gnu.org Hi, the following formula will do this for me: | row | data | |-----+------| | 2 | 0303 | | 3 | 5123 | | 4 | 41 | | 5 | 4234 | | 6 | 34 | #+TBLFM: $1=3D@# Regards, Bernhard Pr=F6ll 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-col= umn-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 >