From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Proposal/request for input: slidify export for html slides Date: Sat, 8 Feb 2014 17:18:04 +0000 (UTC) Message-ID: References: <20140130014552.GA8980@eyeBook> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCBY7-0004uX-Pm for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 12:18:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCBY1-0008Vf-Tk for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 12:18:39 -0500 Received: from plane.gmane.org ([80.91.229.3]:57946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCBY1-0008Vb-NO for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 12:18:33 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WCBXy-00051C-Cp for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 18:18:30 +0100 Received: from 137.110.36.180 ([137.110.36.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Feb 2014 18:18:30 +0100 Received: from ccberry by 137.110.36.180 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Feb 2014 18:18:30 +0100 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org John Hendy gmail.com> writes: > > On Fri, Feb 7, 2014 at 11:38 PM, John Hendy gmail.com> wrote: > > On Fri, Feb 7, 2014 at 7:04 PM, Charles Berry ucsd.edu> wrote: > > [snip] > > > I'll look into those. I just cloned your repo and loaded ox-ravel. > > Quite nice! It worked /pretty/ well out of the box. One issue is that > > it doesn't seem to obey :eval no for babel blocks. I exported to .Rmd > > successfully, but the presentation has a bunch of errors in the code > > blocks from trying to actually execute the code. The .Rmd doesn't have > > any instances of ```{r eval=F}; could this feature be added? > > Just kidding. Discovered #+attr_ravel and the proper knitr argument > for code chunks, which worked as expected with: > > #+attr_ravel: eval=F > #+begin_src R ... > > I still think it makes sense to allow :eval no. This seems more > "Org-ish" since the ideology is to have one set of Org syntax where > possible, which translates to any number of languages. [...] In principal, it makes sense to map babel header args to knitr chunk options. At least when the headers arg and chunk option do about the same thing. But there is some effort and overhead involved, so only the most useful (IMO) have been mapped. Right now, `:noweb yes' will expand the reference(s) in place before export, and `:exports none' will not export the block. Maybe one day ... > I get that we > have #+attr_latex for latex-only things, #+attr_html for html-only > things, and so on, but I wouldn't consider :eval to fall into this > category. Or perhaps I don't understand... would the idea be that I > don't want to run it in *Org*, but I'd not want all my chunks disabled > in the .Rmd? More a matter of what my workflow is (so the issue doesn't arise). I use the cache=TRUE chunk option on the knitr side to save the results of long running computations. When I start work, I execute a src block that loads knitr and knits the *.Rnw (or *.Rmd, etc), which has the side effect of loading the cached objects. Then I edit the *.org document. If I am working on R code, I run the code interactively either from the src edit buffer or I C-c C-c the src block. Its handy to leave the results in the *.org buffer for reference - they get stripped on export. Maybe I edit a figure caption (knitr option fig.cap=), equations, or text. When I am ready to see the formatted doc, I export via ravel, knit, and view. The cached objects get rebuilt as needed. > > My workflow might be odd in that I tend to futz with plot parameters > once, get the desired image, and then set :eval no for the rest of my > document work so I don't have to wait for plots on iterative exports. > I try to put all my setup code (load packages, data > reading/manipulation, etc.) in it's own block so that I can easily run > that whenever I first open the document. From there I only need to > re-run a plot block if necessary and I'll just temporarily change > :eval no -> yes and then back again after execution. > Not odd at all if it saves you time. But if it takes long to rebuild the objects in that first src block, you might want to try the cache=TRUE route. Chuck p.s. the weird fontification you noted one posting up in this thread seems like something to raise with the slidify/knitr devs after checking the *.Rmd to be sure there is no org/ravel induced problem.