[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 10:16:44 -0800 |
User-agent: |
Alpine 2.00 (OSX 1167 2008-08-23) |
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