From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [New Latex Exporter][BABEL][BUG] lists and inline src Date: Thu, 20 Sep 2012 14:13:28 +0200 Message-ID: <87vcf8dh93.fsf@gmail.com> References: <87haqvf1e0.fsf@tajo.ucsd.edu> <87392eqv0e.fsf@bzg.ath.cx> <87627a3tk9.fsf@tajo.ucsd.edu> <878vc57et0.fsf_-_@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEfhM-0004pk-85 for emacs-orgmode@gnu.org; Thu, 20 Sep 2012 08:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TEfhF-0007hf-RD for emacs-orgmode@gnu.org; Thu, 20 Sep 2012 08:17:40 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:59043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TEfhF-0007hV-LA for emacs-orgmode@gnu.org; Thu, 20 Sep 2012 08:17:33 -0400 Received: by weys10 with SMTP id s10so1340784wey.0 for ; Thu, 20 Sep 2012 05:17:32 -0700 (PDT) In-Reply-To: <878vc57et0.fsf_-_@gmx.com> (Eric Schulte's message of "Wed, 19 Sep 2012 17:50:35 -0600") 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: Eric Schulte Cc: emacs-orgmode@gnu.org, cberry@tajo.ucsd.edu Hello, Eric Schulte writes: > Does this problem present itself when you execute the inline code block > interactively, or only when using the new latex exporter? If the later > then it is a latex exporter bug and not a Babel bug. I've updated the > subject line so that hopefully the latex export experts will notice this > message. Indeed, the parser doesn't understand: - src_emacs-lisp{(+ 1 2)} That's a bug. The problem is related to `org-babel-inline-src-block-regexp', which is used by the parser. More accurately, at the beginning of that regexp, there is: "\\(?:^\\|[^-[:alnum:]]\\)\\(src_" Item contents start at the "s" from "src" but the regexp cannot match from there. So, is "[^-[:alnum:]]" (and, therefore, "\\(?:^\\|[^-[:alnum:]]\\)") really necessary? Why couldn't an user be able to write an inline-src-block in the middle of something (for example with raw results)? If checking the character before the inline-src-block object is mandatory, I'll have to rely on an hack in org-element.el, along the lines of: #+begin_src emacs-lisp (save-excursion (unless (bolp) (backward-char)) (re-search-forward org-babel-inline-src-block-regexp nil limit) ...) #+end_src Obviously, I'd rather have the first part of the regexp removed. What do you think? Regards, -- Nicolas Goaziou