On Tue, 9 May 2006, [EMAIL PROTECTED] 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 _______________________________________________ Emacs-orgmode mailing list Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode