From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maurizio Vitale Subject: [babel] problems with org-babel-src-block-regexp Date: Thu, 11 Mar 2010 12:02:29 -0500 Message-ID: <873a06iyfu.fsf@cuma.i-did-not-set--mail-host-address--so-tickle-me> Reply-To: maurizio.vitale@polymath-solutions.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpkyT-0001wb-N2 for emacs-orgmode@gnu.org; Thu, 11 Mar 2010 11:11:01 -0500 Received: from [140.186.70.92] (port=40117 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpkyS-0001w8-Oa for emacs-orgmode@gnu.org; Thu, 11 Mar 2010 11:11:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NpkyR-0004ud-QJ for emacs-orgmode@gnu.org; Thu, 11 Mar 2010 11:11:00 -0500 Received: from lo.gmane.org ([80.91.229.12]:55435) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NpkyR-0004uR-Kh for emacs-orgmode@gnu.org; Thu, 11 Mar 2010 11:10:59 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NpkyQ-0003Kr-5D for emacs-orgmode@gnu.org; Thu, 11 Mar 2010 17:10:58 +0100 Received: from pool-96-236-162-100.pitbpa.east.verizon.net ([96.236.162.100]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Mar 2010 17:10:58 +0100 Received: from maurizio.vitale by pool-96-236-162-100.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 11 Mar 2010 17:10:58 +0100 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 There're problems with org-babel-src-block-regexp when the src block contains the block delimiters (for instance in strings or comments). Granted, this is an uncommon occurrence (which I discovered by accident) editing an org-file containing elisp code that needed to insert #+begin_src...#+end_src pairs, but if it is not too difficult to fix it would be nice to have a more useful behaviour. This is my setting: org-babel-src-block-regexp is a variable defined in `org-babel.el'. Its value is "^[ ]*#\\+begin_src[ ]+\\(python\\|sh\\|emacs-lisp\\)[ ]*\\([^\":\n]*\"[^\"\n*]*\"[^\":\n]*\\|[^\":\n]*\\)\\([^\n]*\\)\n\\([^