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