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 19:24:27 -0800 [thread overview]
Message-ID: <alpine.OSX.2.00.1501141845580.1693@charles-berrys-macbook.local> (raw)
In-Reply-To: <86iog95fx4.fsf@example.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1828 bytes --]
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
next prev parent reply other threads:[~2015-01-15 3:24 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
2015-01-14 19:19 ` Sebastien Vauban
2015-01-15 3:24 ` Charles C. Berry [this message]
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.1501141845580.1693@charles-berrys-macbook.local \
--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).