From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Can't export LaTeX source code blocks Date: Sat, 27 Apr 2013 11:16:20 +0200 Message-ID: <86ip38xriz.fsf@somewhere.org> References: <86obd67427.fsf@somewhere.org> <87zjwqb9wd.fsf@gmail.com> <867gju6xyd.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello Thomas, Thomas S. Dye wrote: > "Sebastien Vauban" writes: > >>>> The code block is NEVER exported. I don't understand why? >>> >>> I'm not sure either. >>> >>> This is not a problem from the exporter as `org-export-execute-babel-code' >>> on your ECM makes the src block disappear. >> >> The only buggy behavior is the first one: the fact that the "code" block >> disappears, as you say. > > I took a quick look at ob-latex.el. The code there sets `:exports > results' and then, IIUC, goes on its way without checking if :exports > has been set in the buffer. > > It looks to me like ob-latex.el would need to be revised. I don't have the impression that the error lies in `ob-latex' as the other `ob-LANG' files don't either make any special check -- while all graphics-only languages do, as well, have the default of "results" for ":exports". I have the impression the problem is to search in `ob-core' (`org-babel-execute-src-block') or `ob-exp'... But that's not yet clear to me where that could be. FYI, I have collected extra information about the problem: it is the file-wide property which is not taken into account (only in the case of the LaTeX code blocks, though). If we put the header argument ":exports both" on the code block itself, I get the expected result... --8<---------------cut here---------------start------------->8--- #+TITLE: ECM skeleton.org #+PROPERTY: tangle skeleton.cls #+PROPERTY: exports both * ECM LaTeX KO Code block: #+name: ecm-code-block-1 #+begin_src latex \DescribeMacro{\dummyMacro} This macro does nothing.\index{doing nothing|usage} #+end_src Results block: #+results: ecm-code-block-1 #+BEGIN_LaTeX \DescribeMacro{\dummyMacro} This macro does nothing.\index{doing nothing|usage} #+END_LaTeX * ECM LaTeX okay #+name: ecm-code-block-2 #+begin_src latex :exports both \DescribeMacro{\dummyMacro} This macro does nothing.\index{doing nothing|usage} #+end_src Results block: #+results: ecm-code-block-2 #+BEGIN_LaTeX \DescribeMacro{\dummyMacro} This macro does nothing.\index{doing nothing|usage} #+END_LaTeX --8<---------------cut here---------------end--------------->8--- Best regards, Seb -- Sebastien Vauban