From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: drostekirsten@gmail.com Newsgroups: gmane.emacs.help Subject: Re: auto incremental columns in table of org-mode? Date: Wed, 19 Mar 2008 02:55:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <19f435d3-b7dc-400b-a6f9-8d5a58565cf5@13g2000hsb.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205978554 14016 80.91.229.12 (20 Mar 2008 02:02:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2008 02:02:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 20 03:03:04 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 1JcA7S-0004xU-3h for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Mar 2008 03:03:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcA6s-0003US-03 for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Mar 2008 22:02:26 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!13g2000hsb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 145.18.18.208 Original-X-Trace: posting.google.com 1205920553 27550 127.0.0.1 (19 Mar 2008 09:55:53 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 19 Mar 2008 09:55:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 13g2000hsb.googlegroups.com; posting-host=145.18.18.208; posting-account=Bf7QCwoAAACqdp8qhWu4yw0bydsggsDm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:157160 X-Mailman-Approved-At: Wed, 19 Mar 2008 22:01:32 -0400 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:52554 Archived-At: On Mar 18, 11:24 pm, Bastien wrote: > poppyer writes: > >> 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 ;N is not required here, this is for Calc formulas only.) > > > 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 ..." > > Yes, that's a problem. This is because when looking for a relative > reference, if Org encounters a non-number row, it falls back on the next > row in the same column... I'll send a bug report to Carsten for this. > > > Any idea to exclude the first "1" without being updated? > > If you don't really need to compute the first column you can always > use a dummy macro like this one: > > C-a f3 | C-xC-kC-i | | C-j f4 > > Then use it with C-x e e e e as many times as you want rows... Even easier is this: Put a 1 into the first field, and press S-RET to fill the column with increasing numbers. As Bastien says, this will not recompute when you add or remove lines. - Carsten