From mboxrd@z Thu Jan 1 00:00:00 1970 From: chgreg692000@yahoo.com Subject: Re: org-mode + xemacs + patch Date: Wed, 10 May 2006 10:40:11 +0300 Message-ID: <7u7j4utjj8.fsf@horizonsemi.com> References: <7uejz3tgzd.fsf@horizonsemi.com> <30cf789d7cbc5c3caf7b6eea1a1e08f8@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdjIy-00045K-9B for emacs-orgmode@gnu.org; Wed, 10 May 2006 03:40:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdjIu-00044h-Bg for emacs-orgmode@gnu.org; Wed, 10 May 2006 03:40:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdjIt-00044Y-H1 for emacs-orgmode@gnu.org; Wed, 10 May 2006 03:40:16 -0400 Received: from [212.25.79.210] (helo=localhost.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FdjK7-0003eZ-Rm for emacs-orgmode@gnu.org; Wed, 10 May 2006 03:41:32 -0400 Received: from localhost.localdomain (cs-lin-1 [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id k4A7eBdE012522 for ; Wed, 10 May 2006 10:40:11 +0300 In-Reply-To: <30cf789d7cbc5c3caf7b6eea1a1e08f8@science.uva.nl> (Carsten Dominik's message of "Tue, 9 May 2006 16:58:30 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Tue, 9 May 2006, dominik@science.uva.nl wrote: > Hi Greg, > > thank you very much, I will take a look at your patch. > > Can you give us a few examples on how you use the lisp expression in > actual tables? What kind of applications do you have in mind? > Lisp expression in tables can be used for string manipulations, regexp, control structures. Maybe there is a way to do it with 'calc-eval' but i didn't found it. Look at the following example: |---+-------------------+---------+----------| | | scan | scan_in | scan_out | | | | witdh | width | |---+-------------------+---------+----------| | ! | | 0 | 0 | | # | "SCAN_IN0[12:0]" | 13 | 0 | | # | "SCAN_IN1[3:0]" | 17 | 0 | | # | "SCAN_OUT0[15:0]" | 17 | 16 | | # | "SCAN_IN2[22:0]" | 40 | 16 | | # | "SCAN_OUT1[44:0]" | 40 | 61 | | # | "SCAN_IN3[5:0]" | 46 | 61 | |---+-------------------+---------+----------| #+TBLFM: $3='(number-to-string (if (string-match "SCAN_IN.*\\[\\([0-9]+\\):\\([0-9]+\\)\\]" $2) (+ (string-to-number (match-string 1 $2)) 1 &1) &1))::$4='(number-to-string (if (string-match "SCAN_OUT.*\\[\\([0-9]+\\):\\([0-9]+\\)\\]" $2) (+ (string-to-number (match-string 1 $2)) 1 &1) &1)) In this table inputs are names of scan_in and scan_out buses, outputs are total width of scan_in bus and total width of scan_out bus. > - Carsten Regards, Greg