emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [bug] Wrong type argument, computation and layout of inline Babe


From: Charles C. Berry
Subject: Re: [O] [bug] Wrong type argument, computation and layout of inline Babel calls
Date: Wed, 14 Jan 2015 19:24:27 -0800
User-agent: Alpine 2.00 (OSX 1167 2008-08-23)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]