From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: How to ensure code blocks are run during export? Date: Fri, 03 May 2013 13:16:13 +0200 Message-ID: <86txmk9uv6.fsf@somewhere.org> References: <86bo8sbggr.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 Alan, Alan Schmitt wrote: > Sebastien Vauban writes: >> Alan Schmitt wrote: >>> I'm writing an exam in org mode, and it's going really well. I need to >>> have some code in code blocks being run during export (as it's defining >>> some functions for later questions), but I don't want anything to be >>> displayed in the final document. At the moment I use the following >>> options in the block: >>> >>> :results silent :exports results >>> >>> Is it the correct way to do it? >> >> It works, but a better way'd simply be ":exports none". > > I tried, and this does not run the code block (I see errors for later > code blocks that depend on it, and there is no mention of running that > code block in the log). The following does work. --8<---------------cut here---------------start------------->8--- #+name: do-this #+begin_src org :results drawer replace :var you="44" :exports none Hello $you #+end_src #+begin_src org :results drawer replace :var data=do-this :exports results Value: $data #+end_src --8<---------------cut here---------------end--------------->8--- Maybe giving an ECM would help. Best regards, Seb -- Sebastien Vauban