From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.help Subject: Re: auto incremental columns in table of org-mode? Date: Tue, 18 Mar 2008 22:24:09 +0000 Message-ID: <87y78fy8l2.fsf@bzg.ath.cx> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205879081 24401 80.91.229.12 (18 Mar 2008 22:24:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Mar 2008 22:24:41 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: poppyer Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 18 23:25:10 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 1JbkF4-0002cW-AN for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2008 23:25:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbkEU-0004i2-9Z for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Mar 2008 18:24:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JbkEC-0004gL-LL for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 18:24:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JbkEB-0004ff-3n for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 18:24:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbkEA-0004fW-V6 for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 18:24:14 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.159]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JbkEA-0008Dq-It for help-gnu-emacs@gnu.org; Tue, 18 Mar 2008 18:24:15 -0400 Original-Received: by fg-out-1718.google.com with SMTP id d23so124484fga.30 for ; Tue, 18 Mar 2008 15:24:13 -0700 (PDT) Original-Received: by 10.82.161.19 with SMTP id j19mr3982692bue.12.1205879052371; Tue, 18 Mar 2008 15:24:12 -0700 (PDT) Original-Received: from bzg.ath.cx ( [81.99.213.34]) by mx.google.com with ESMTPS id t2sm3338550gve.3.2008.03.18.15.24.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Mar 2008 15:24:11 -0700 (PDT) Original-Received: by bzg.ath.cx (Postfix, from userid 1000) id AEE20157978; Tue, 18 Mar 2008 22:24:09 +0000 (GMT) In-Reply-To: (poppyer@gmail.com's message of "Tue, 18 Mar 2008 20:57:25 +0000") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:52506 Archived-At: 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... HTH, -- Bastien