emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Sebastien Vauban
	<public-sva-news-D0wtAvR13HarG/iDocfnWg@plane.gmane.org>,
	emacs-orgmode@gnu.org
Subject: Re: [bug] Wrong type argument, computation and layout of inline Babel calls
Date: Wed, 14 Jan 2015 10:16:44 -0800	[thread overview]
Message-ID: <alpine.OSX.2.00.1501141006220.826@charlessmacbook> (raw)
In-Reply-To: <86twztqral.fsf@example.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1459 bytes --]

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

  reply	other threads:[~2015-01-14 18:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 16:07 [bug] Wrong type argument, computation and layout of inline Babel calls Sebastien Vauban
2015-01-14 18:16 ` Charles C. Berry [this message]
2015-01-14 19:19   ` Sebastien Vauban
2015-01-15  3:24     ` Charles C. Berry
2015-01-15 12:37       ` Sebastien Vauban
2015-01-15 17:17         ` Charles C. Berry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.OSX.2.00.1501141006220.826@charlessmacbook \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=public-sva-news-D0wtAvR13HarG/iDocfnWg@plane.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).