From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [HOW] no way to escape vertical bar (pipe char) in tables? Date: Mon, 07 Mar 2011 08:47:36 -0700 Message-ID: <87ipvvexuv.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=48485 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwcev-0005EQ-Vs for emacs-orgmode@gnu.org; Mon, 07 Mar 2011 10:47:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwceu-0006H0-Lm for emacs-orgmode@gnu.org; Mon, 07 Mar 2011 10:47:45 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:56017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwceu-0006Gq-JR for emacs-orgmode@gnu.org; Mon, 07 Mar 2011 10:47:44 -0500 Received: by yxt33 with SMTP id 33so2168762yxt.0 for ; Mon, 07 Mar 2011 07:47:43 -0800 (PST) In-Reply-To: (Vladimir Alexiev's message of "Thu, 24 Feb 2011 11:59:39 +0000 (UTC)") 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: Vladimir Alexiev Cc: emacs-orgmode@gnu.org Vladimir Alexiev writes: > I want to manage some perl regexps in a table > then feed them to a code block (literate programming). > Unfortunately they include alternatives (|)=20 > and the table editor thinks this is a column break. > > There's no way to escape this? > Using a different character (namely =C2=A6) the following should work #+source: clean #+begin_src emacs-lisp :var in=3D"" (flet ((clean (in) (if (listp in) (mapcar #'clean in) (if (stringp in) (replace-regexp-in-string "=C2=A6" "|" in) in)))) (clean in)) #+end_src #+results: regexps | first | (a=C2=A6b) | | second | (1=C2=A62) | #+begin_src perl :var a=3Dclean(in=3Dregexps)[0,1] :var b=3Dclean(in=3Drege= xps)[1,1] $a; $b; #+end_src #+results: : (1|2) Best -- Eric