emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Bug in babel eating my text


From: Eric Schulte
Subject: Re: [Orgmode] Bug in babel eating my text
Date: Thu, 20 Jan 2011 09:32:28 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Andreas Leha <address@hidden> wrote:
>
>> I found a severe bug that actually eats my text, i.e. *destroys* my
>> org-mode file.
>> 
>> Or am I missing something here?
>> 
>> Just try that:
>> 
>> * Test
>> 
>>   Execute this once:
>>   #+BEGIN_src R :session test :results output silent :exports none
>>     devnull <- library("tikzDevice")
>>   #+END_src
>>  
>>   Execute this twice or more... but be careful
>>   #+BEGIN_src R :session test :results output latex :exports results
>>     tikz(console=TRUE, width=4, height=4)
>>     plot(1:2,1:2)
>>     devnull <- dev.off()
>>   #+END_src
>> 
>> * Watch me die :-(
>> 
>
> I can reproduce this: it seems to be eating one character each time it is
> executed at the end of the #+END_LaTeX. Here's a patch that seems to fix
> this problem - however, it is not based on any real understanding of the code,
> so take it with a grain of salt. Also, if this fix works, then it is likely
> that the other "wrap" cases will also need similar treatment:
>

Hi Nick,

I've just applied I generalization of your solution below, thanks for
sharing.  This is a bug that has resurfaced every time we make a change
to the insertion of results.  Hopefully this fix will be last for a
while.

Best -- Eric

>
> diff --git a/lisp/ob.el b/lisp/ob.el
> index 82625c0..2ce57ca 100644
> --- a/lisp/ob.el
> +++ b/lisp/ob.el
> @@ -1500,7 +1500,7 @@ code ---- the results are extracted in the syntax of 
> the source
>          ((member "html" result-params)
>           (wrap "#+BEGIN_HTML\n" "#+END_HTML"))
>          ((member "latex" result-params)
> -         (wrap "#+BEGIN_LaTeX\n" "#+END_LaTeX"))
> +         (wrap "#+BEGIN_LaTeX\n" "#+END_LaTeX\n"))
>          ((member "code" result-params)
>           (wrap (format "#+BEGIN_SRC %s%s\n" (or lang "none") 
> results-switches)
>                 "#+END_SRC"))
>
> HTH,
> Nick



reply via email to

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