From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [bug] Wrong type argument, computation and layout of inline Babel calls Date: Wed, 14 Jan 2015 10:16:44 -0800 Message-ID: References: <86twztqral.fsf@example.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1377082167-1421258818=:826" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBSYH-0007CV-7C for emacs-orgmode@gnu.org; Wed, 14 Jan 2015 13:20:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBSYD-0005nr-Nh for emacs-orgmode@gnu.org; Wed, 14 Jan 2015 13:20:20 -0500 Received: from iport-acv2-out.ucsd.edu ([132.239.0.174]:36679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBSYD-0005nb-Cb for emacs-orgmode@gnu.org; Wed, 14 Jan 2015 13:20:17 -0500 In-Reply-To: <86twztqral.fsf@example.com> Content-ID: 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: Sebastien Vauban , emacs-orgmode@gnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1377082167-1421258818=:826 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: Sebastien, See below. On Wed, 14 Jan 2015, Sebastien Vauban wrote: > Hello, > > This ECM exhibits different troubles: > > - error when exporting to HTML > - bad layout > - bad computation > > --8<---------------cut here---------------start------------->8--- > * Square > > #+name: square > #+begin_src emacs-lisp :tangle no :var x=1 > (* x x) > #+end_src > > ** Good computation, good layout > > Carré de 6 : *call_square(x=6)[:results raw]*. > > Carré de 8 : call_square(x=8)[:results raw]. > > ** Bad layout in both HTML and LaTeX > > Carré de 5 : > *call_square(x=5)[:results raw]*. > > ** Error in HTML (Wrong type argument: arrayp, nil) and bad computation in LaTeX > > Carré de 7 : > call_square(x=7)[:results raw]. > --8<---------------cut here---------------end--------------->8--- Looks like `org-babel-get-lob-one-liner-matches' doesn't always put point in the right place. Try this: ,---- | diff --git a/lisp/ob-core.el b/lisp/ob-core.el | index 80542ec..47fcaca 100644 | --- a/lisp/ob-core.el | +++ b/lisp/ob-core.el | @@ -251,7 +251,7 @@ Returns non-nil if match-data set" | Returns non-nil if match-data set" | (save-excursion | (unless (= (point) (point-at-bol)) ;; move before inline block | - (re-search-backward "[ \f\t\n\r\v]" nil t)) | + (re-search-backward "\\([^[:alnum:]]\\|[ \f\t\n\r\v]\\)call_" nil t)) | (if (looking-at org-babel-inline-lob-one-liner-regexp) | t | nil))) `---- HTH, Chuck --0-1377082167-1421258818=:826--