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 19:24:27 -0800 Message-ID: References: <86twztqral.fsf@example.com> <86iog95fx4.fsf@example.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-310554966-1421289998=:1693" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBb2v-0002I0-Sa for emacs-orgmode@gnu.org; Wed, 14 Jan 2015 22:24:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBb2s-0001Ws-KM for emacs-orgmode@gnu.org; Wed, 14 Jan 2015 22:24:33 -0500 Received: from iport-acv1-out.ucsd.edu ([132.239.0.176]:10420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBb2s-0001WK-BN for emacs-orgmode@gnu.org; Wed, 14 Jan 2015 22:24:30 -0500 In-Reply-To: <86iog95fx4.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-310554966-1421289998=:1693 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: On Wed, 14 Jan 2015, Sebastien Vauban wrote: > Hello Charles, > > "Charles C. Berry" wrote: >> On Wed, 14 Jan 2015, Sebastien Vauban wrote: >>> This ECM exhibits different troubles: [snip] >>> >>> 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, > > It does solve the "square of 5" problem, in both HTML and LaTeX. Thanks. > > Though, it does not solve anything regarding the last one ("square of > 7"): error in HTML, and results "1" in LaTeX... It does solve the babel-execute part. But I didn't copy-and-paste that last `.' which affects export. --- After C-c C-c or org-export-execute-babel-code: ,---- | call_square(x=7)[:results raw] 49. `---- What this crestes on export is an ordered list with one element whose :bullet is followed by an empty paragraph. A `feature' not a bug? Note what this yields: * ordered list src_emacs-lisp[:results raw]{100}. src_emacs-lisp[:results raw]{99}. src_emacs-lisp[:results raw]{98}. call_square(x=1)[:results raw]. Under ascii backend: ,---- | 1. | 2. | 3. | 4. `---- HTH, Chuck --0-310554966-1421289998=:1693--