From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: poppyer Newsgroups: gmane.emacs.help Subject: Re: auto incremental columns in table of org-mode? Date: Tue, 18 Mar 2008 20:57:25 +0000 Organization: University Of Oxford, England Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205876462 15284 80.91.229.12 (18 Mar 2008 21:41:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 21:41:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 18 22:41:29 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JbjYa-0002ZY-Tr for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2008 22:41:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbjY1-0006kx-3G for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2008 17:40:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!easynet-quince!easynet.net!feed4.jnfs.ja.net!jnfs.ja.net!feeds.news.ox.ac.uk!news.ox.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: clpc78.comlab.ox.ac.uk Original-X-Trace: frank-exchange-of-views.oucs.ox.ac.uk 1205873845 7098 129.67.148.212 (18 Mar 2008 20:57:25 GMT) Original-X-Complaints-To: newsmaster@ox.ac.uk Original-NNTP-Posting-Date: Tue, 18 Mar 2008 20:57:25 +0000 (UTC) User-Agent: Emacs Gnus Cancel-Lock: sha1:Dp726OIb5L//wxpeOWKnVtiF1PU= Original-Xref: shelby.stanford.edu gnu.emacs.help:157133 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52505 Archived-At: Bastien writes: > poppyer writes: > >> I am using orgtbl-mode minor mode, basically as following: >> >> | k | n | f(n,k) | >> |---+-----+--------| >> | 1 | 100 | | >> | 2 | | | >> | 3 | | | >> | | | | >> | | | | >> | | | | >> >> My question is how can I fill the k column when I add rows? > > I would define a formula for this table. > > #+TBLFM: $1='(1+ @-1);N > > This basically says: for the each cell in the first column, compute the > value of the cell by adding 1 to the value of the cell above. I am using similar $1=@-1+1;N The problem is, it works at the first time. But every time you use C-u C-c C-c to update the whole table. The whole $1 column increase by 1. i.e. "1 2 3 ... " ===> "2 3 4 ..." Any idea to exclude the first "1" without being updated? Thanks, poppyer > > Use C-c * or C-u C-c to re-compute the values in this column. --