Hi Bastien,

thanks for your answer. 

>> when the follwing org-file is exported to LaTeX, #+BEGIN_ORG
>> and #+END_ORG is inserted in the tex-file.
>
> You surely want
> #+begin_src org
> #+end_src org
> "#+begin_org" doesn't exist.

#+BEGIN_ORG 
#+END_ORG

gets inserted by org-babel. Here is the relevant part of ob.el lines
1620 ff.

#+srcname: ob.el
#+begin_src emacs-lisp
  ;; ....
  ((member "org" result-params)
   (wrap "#+BEGIN_ORG" "#+END_ORG"))
  ;; ...
#+end_src emacs-lisp

Here is an example which shows the issue.

#+begin_src org
* Testing org-babel perl
  
  #+srcname: TestingPerl
  #+begin_src perl :exports results :results output org
    print("#+CAPTION: A caption\n");
    print("#+LABEL: tbl:dvi\n");
    print("#+ATTR_LaTeX: placement[H]\n");
    print("| *bold/T* |\n");
    print("|--------|\n");
    print("| normal |\n");
  #+end_src

  #+results: TestingPerl
  #+BEGIN_ORG
  #+CAPTION: A caption
  #+LABEL: tbl:dvi
  #+ATTR_LaTeX: placement[H]
  | *bold/T* |
  |--------|
  | normal |
  #+END_ORG
#+end_src org

I tested replacing 

 #+BEGIN_ORG 
 #+END_ORG 

with 

 #+BEGIN_SRC org
 #+END_SRC org

But that doesn't work. The org-babel output is inserted verbatim when
exported to LaTeX. That is not what is expected. 

I could use a

:results output raw

header, but with a long output (including blank lines) org-babel has
problems finding the end of the output when recalculating the source
block. The org-babel output gets appended not rewritten.

My workaround is not indenting the source block. Then everything works
as expected. But indented soure blocks look nicer.

Thanks again for looking into this.
-- 
Mit freundlichen Grüßen / Best regards 

Thomas Holst 
DGS-EC/ESE4

Tel.   +49 (711) 811-40681
PC-Fax +49 (711) 811-5182208

Reply via email to