From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Worg Tutorial error: using Emacs lisp as formulas Date: Tue, 26 Aug 2014 22:52:08 -0400 Message-ID: <87a96qhcfb.fsf@alphaville.dokosmarshall.org> References: <53FCDD83.40206@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMTLa-00030i-Px for emacs-orgmode@gnu.org; Tue, 26 Aug 2014 22:52:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMTLT-0006eM-Ja for emacs-orgmode@gnu.org; Tue, 26 Aug 2014 22:52:30 -0400 Received: from plane.gmane.org ([80.91.229.3]:35936) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMTLT-0006e7-Cs for emacs-orgmode@gnu.org; Tue, 26 Aug 2014 22:52:23 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XMTLR-0004oK-JC for emacs-orgmode@gnu.org; Wed, 27 Aug 2014 04:52:21 +0200 Received: from pool-108-20-41-17.bstnma.fios.verizon.net ([108.20.41.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Aug 2014 04:52:21 +0200 Received: from ndokos by pool-108-20-41-17.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Aug 2014 04:52:21 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Ciaran Mulloy writes: > Hi! > I was fascinated to work through the examples provided in the org-tutorials sections under Worg and really see the power of using eLisp as spreadsheet formula: http://orgmode.org/worg/ > org-tutorials/org-spreadsheet-lisp-formulas.html > > However the use of the mapconcat function always generated an error: Invalid regex "Regular expression too big", even with only a few terms in the formula. > > The offending formula was: > > #+TBLFM: @2$3='(mapconcat 'identity (delete-dups (list @2$1..@>$1 @2$2..@>$2)) " ") > > I experimented with variations of the formula getting the same error every time. > > I did a search of the org-mode forum without finding any solution. > > Any thoughts? > I can't reproduce it - e.g. this --8<---------------cut here---------------start------------->8--- | one | two | three | four | five | |-----+-----+---------------+------+------| | a | a | a b c e f d g | | | | a | b | | | | | b | a | | | | | c | d | | | | | e | f | | | | | f | g | | | | | a | f | | | | #+TBLFM: @2$3='(mapconcat 'identity (delete-dups (list @2$1..@>$1 @2$2..@>$2)) " ") --8<---------------cut here---------------end--------------->8--- works fine for me. This is with more-or-less latest org. Moreover, none of the functions used (mapconcat, identity, delete-dups or list) use regexps at all. There is a chance that regexps are used by the evaluator when building the ranges, but it's unlikely IMO, so the regexp error seems like a red herring to me. How big a table did you try? Did you try restarting emacs and redoing the evaluation? How about starting emacs without any of your customizations and redoing the evaluation? Something like this emacs -q -l /path/to/minimal/init /path/to/file/with/the/table where the minimal init file just sets load-path if necessary and initializes org. -- Nick