emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [BUG] org-confirm-babel-evaluate breaks inline src blocks


From: Charles Berry
Subject: Re: [O] [BUG] org-confirm-babel-evaluate breaks inline src blocks
Date: Sat, 23 Nov 2013 18:24:17 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Schulte <schulte.eric <at> gmail.com> writes:

> 
> Charles Berry <ccberry <at> ucsd.edu> writes:
> 
> > Eric Schulte <schulte.eric <at> gmail.com> writes:
> >
> >> 
> >> Charles Berry <ccberry <at> ucsd.edu> writes:
> >> 
> > 

[snip]

> Indeed the fix was to set this element of info to point to the front of
> the inline src block.  I imagine that you probably don't have the
> patched version of the relevant function loaded.  Please try M-x
> describe-function on org-babel-get-src-block-info, then jump to the
> definition of said function where you should see the following code
> which now sets the location of the inline src block head into the last
> element of the info list.
> 
>       ;; inline source block
>       (when (org-babel-get-inline-src-block-matches)
>       (setq head (match-beginning 0))
>       (setq info (org-babel-parse-inline-src-block-match))))
> 


That _is_ what I had loaded, but ...

org-babel-get-src-block-info is *not* *called* for inline src blocks.

org-babel-exp-non-block-elements doesn't call org-babel-get-src-block-info.
Instead, it has this

 (let* ((info (org-babel-parse-inline-src-block-match))

for inline src blocks.

So changing org-babel-get-src-block-infodoes not fix the inline src block
issue.

===

Juat to be  sure that I understood what was happening, I instrumented
org-babel-get-src-block-info and ran the ECM I posted at the start of this 
thread. 

org-babel-get-src-block-info got called twice for the first src block, then 
I got prompted 

"Evaluate this emacs-lisp code block on your system? "

If I  answer 'n' (skip the block redefining org-confirm-babel-evaluate, 
then I get prompted for the inline src block _without_ 
org-babel-get-src-block-info being called again.

If I answer 'y' (redefine org-confirm-babel-evaluate as a lambda form),
I get the error message.

org-babel-exp-results: Wrong type argument: integer-or-marker-p, nil

HTH,

Chuck




reply via email to

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