From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [babel] small patch (inline src blocks cannot start at bol) Date: Mon, 29 Aug 2011 23:21:12 +0200 Message-ID: <87obz7j4mv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy9Ir-00050V-Tp for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 17:23:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy9Iq-0003R5-Nk for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 17:23:33 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:42642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy9Iq-0003Qz-JN for emacs-orgmode@gnu.org; Mon, 29 Aug 2011 17:23:32 -0400 Received: by wyi11 with SMTP id 11so4902777wyi.0 for ; Mon, 29 Aug 2011 14:23:31 -0700 (PDT) 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: Org Mode List --=-=-= Content-Type: text/plain Hello, For now inline src blocks cannot start at bol. In the following example, only the first inline block is recognized. This src_emacs-lisp{(1+ 1)} is ok. src_emacs-lisp{"This"} isn't. The small following patch should fix that. Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-ob-allow-inline-src-blocks-to-start-at-bol.patch >From 98ec0a9d86f1b4f35be0530e2d8afb97861a91c0 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 29 Aug 2011 23:13:40 +0200 Subject: [PATCH] ob: allow inline src blocks to start at bol * lisp/ob.el (org-babel-inline-src-block-regexp): Allow regexp to start at bol. --- lisp/ob.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/ob.el b/lisp/ob.el index 5d91ac3..9d80056 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -143,7 +143,7 @@ remove code block execution from the C-c C-c keybinding." (defvar org-babel-inline-src-block-regexp (concat ;; (1) replacement target (2) lang - "[^-[:alnum:]]\\(src_\\([^ \f\t\n\r\v]+\\)" + "\\(?:^\\|[^-[:alnum:]]\\)\\(src_\\([^ \f\t\n\r\v]+\\)" ;; (3,4) (unused, headers) "\\(\\|\\[\\(.*?\\)\\]\\)" ;; (5) body -- 1.7.6.1 --=-=-=--