* bug in exporter (org-babel-exp-process-buffer)
@ 2014-06-10 0:22 Charles Berry
2014-06-10 20:00 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Charles Berry @ 2014-06-10 0:22 UTC (permalink / raw)
To: emacs-orgmode
The use of `org-confirm-babel-evaluate' as a function breaks inline src
blocks just as was described in this thread from last year:
http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00669.html
I believe that the patch by Eric Schulte in
===
commit 6a4dfd318296925b3b895ca6ab85e31309acf84d
Author: Eric Schulte <schulte.eric@gmail.com>
Date: Sat Nov 23 12:24:34 2013 -0700
fixed export of inline src blocks
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Fixed export of
inline src blocks.
===
did the right thing back then, but the function to which it was applied was
removed later on,
I think org-babel-exp-process-buffer took over the work of the
removed function.
I believe that Eric's patch or something like it would fix the current
problem in org-babel-exp-process-buffer:
(inline-src-block
- (let* ((info (org-babel-parse-inline-src-block-match))
+ (let* ((head (match-beginning 0))
+ (info (append (org-babel-parse-inline-src-block-match)
+ (list nil nil head)))
(params (nth 2 info)))
(setf (nth 1 info)
Can this be fixed, please?
Thanks,
Chuck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in exporter (org-babel-exp-process-buffer)
2014-06-10 0:22 bug in exporter (org-babel-exp-process-buffer) Charles Berry
@ 2014-06-10 20:00 ` Nicolas Goaziou
2014-06-10 21:11 ` Charles C. Berry
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2014-06-10 20:00 UTC (permalink / raw)
To: Charles Berry; +Cc: emacs-orgmode
Hello,
Charles Berry <ccberry@ucsd.edu> writes:
> The use of `org-confirm-babel-evaluate' as a function breaks inline src
> blocks just as was described in this thread from last year:
>
> http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00669.html
>
[...]
> I believe that Eric's patch or something like it would fix the current
> problem in org-babel-exp-process-buffer:
>
> (inline-src-block
> - (let* ((info (org-babel-parse-inline-src-block-match))
> + (let* ((head (match-beginning 0))
> + (info (append (org-babel-parse-inline-src-block-match)
> + (list nil nil head)))
> (params (nth 2 info)))
> (setf (nth 1 info)
>
> Can this be fixed, please?
I tried to apply these changes in maint, but I see no difference with
current behaviour when exporting the ECM provided in the thread above.
Am I missing something?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in exporter (org-babel-exp-process-buffer)
2014-06-10 20:00 ` Nicolas Goaziou
@ 2014-06-10 21:11 ` Charles C. Berry
2014-06-11 20:15 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Charles C. Berry @ 2014-06-10 21:11 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
On Tue, 10 Jun 2014, Nicolas Goaziou wrote:
> Hello,
>
> Charles Berry <ccberry@ucsd.edu> writes:
>
>> The use of `org-confirm-babel-evaluate' as a function breaks inline src
>> blocks just as was described in this thread from last year:
>>
>> http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00669.html
>>
>
> [...]
>
>> I believe that Eric's patch or something like it would fix the current
>> problem in org-babel-exp-process-buffer:
>>
>> (inline-src-block
>> - (let* ((info (org-babel-parse-inline-src-block-match))
>> + (let* ((head (match-beginning 0))
>> + (info (append (org-babel-parse-inline-src-block-match)
>> + (list nil nil head)))
>> (params (nth 2 info)))
>> (setf (nth 1 info)
>>
>> Can this be fixed, please?
>
> I tried to apply these changes in maint, but I see no difference with
> current behaviour when exporting the ECM provided in the thread above.
> Am I missing something?
>
Sorry, my bad.
`:exports results' needs to be added to the src block:
#+BEGIN_SRC emacs-lisp :exports results
[...]
When run with master, after the prompt for evaluating the src block, an
error is thrown. *Messages* shows
,----
| Evaluate this emacs-lisp code block on your system? (y or n) y
| executing Emacs-Lisp code block...
| Code block evaluation complete.
| cond: Wrong type argument: integer-or-marker-p, nil
`----
evidently the result of (goto-char ,head) with nil as the value of head
when trying to evaluate src_R{...}.
Adding the lines results in correct export with no prompt at the
(later) inline src block.
HTH,
Chuck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bug in exporter (org-babel-exp-process-buffer)
2014-06-10 21:11 ` Charles C. Berry
@ 2014-06-11 20:15 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2014-06-11 20:15 UTC (permalink / raw)
To: Charles C. Berry; +Cc: emacs-orgmode
"Charles C. Berry" <ccberry@ucsd.edu> writes:
> When run with master, after the prompt for evaluating the src block,
> an error is thrown. *Messages* shows
>
> ,----
> | Evaluate this emacs-lisp code block on your system? (y or n) y
> | executing Emacs-Lisp code block...
> | Code block evaluation complete.
> | cond: Wrong type argument: integer-or-marker-p, nil
> `----
>
> evidently the result of (goto-char ,head) with nil as the value of
> head when trying to evaluate src_R{...}.
>
> Adding the lines results in correct export with no prompt at the
> (later) inline src block.
Applied to master. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-11 20:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 0:22 bug in exporter (org-babel-exp-process-buffer) Charles Berry
2014-06-10 20:00 ` Nicolas Goaziou
2014-06-10 21:11 ` Charles C. Berry
2014-06-11 20:15 ` Nicolas Goaziou
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).