From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Updating the Babel section of Worg Date: Wed, 8 Feb 2012 09:41:11 -0600 Message-ID: References: <87mx8xyt7q.fsf_-_@gmx.com> <87pqdrlkuw.fsf_-_@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv9e5-0002pP-IE for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 10:41:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rv9dz-0002Z6-0z for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 10:41:21 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:33463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv9dy-0002Yt-Lz for emacs-orgmode@gnu.org; Wed, 08 Feb 2012 10:41:14 -0500 Received: by bkty12 with SMTP id y12so742224bkt.0 for ; Wed, 08 Feb 2012 07:41:13 -0800 (PST) In-Reply-To: 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org, Eric Schulte , Riccardo Romoli On Tue, Feb 7, 2012 at 6:01 PM, Thomas S. Dye wrote: > Hi Eric, > > I've attached a first draft of a template for review and revision. =C2=A0= It > is heavily influenced by John Hendy's terrific gnuplot page. =C2=A0I > believe it incorporates the points in your outline. =C2=A0Feel free to > edit as appropriate. > Thanks for the kind words. I give the credit to Nick Dokos and Eric Schulte for encouraging me to post my solution on Worg once I found it. -- http://www.mail-archive.com/emacs-orgmode@gnu.org/msg28995.html I hate to say it, but without that nudge I might have "dined and dashed" -- gotten help from the list, solved the issue, and then returned to my cave :) Glad it proved useful! Best regards, John > All the best, > Tom > > > > > Eric Schulte writes: > >> Hi Tom, >> >> tsd@tsdye.com (Thomas S. Dye) writes: >> >>> Hi Eric, >>> >>> Yes, this is overdue. =C2=A0I think your plan is a good one. >>> >>> Perhaps a few of the individual use cases could be moved to FIXME, >>> instead? =C2=A0I'm thinking here of Feiming Chen's R setup and some of = my >>> contributions when I was experimenting writing LaTeX inside source >>> code blocks. =C2=A0The authors could resurrect these as they see fit. >>> >> >> I don't know what FIXME is, but if there is a way to keep the page in >> the worg git repository but remove it from the exported HTML then that >> sounds ideal. >> >>> >>> Hopefully, others will contribute use examples. =C2=A0My sense from rea= ding >>> the list is there are many interesting ones. >>> >>> I'd like it if Org mode users designed a template for the language >>> specific pages. =C2=A0Currently, these seem to me a mixed bag and it wo= uld be >>> good to regularize them. >> >> The below is a modified version of a template which can be found in a >> couple of the existing language tutorials, I think it serves as a good >> starting point. >> >> - Install and Setup >> =C2=A0 - Instillation and configuration of software (e.g., the language = itself) >> =C2=A0 - Configuration of Emacs (e.g., activate language, set command pa= th) >> - Examples >> =C2=A0 - Common ways to use the language in an Org-mode document >> - Special cases >> =C2=A0 - are there any language-specific header arguments >> =C2=A0 - does the language support session evaluation >> =C2=A0 - does the language support all result types >> =C2=A0 - is the language different from most babel languages >> =C2=A0 =C2=A0 (e.g., C is compiled before execution, ditaa returns files= , etc...) >> >>> It would also be nice to have one for each of the supported languages. >>> There are 11 language specific pages now, which leaves quite a few >>> languages under-documented. >> >> (length org-babel-load-languages) ;; =3D> 27 >> >> ls org-contrib/babel/languages/ob-doc-*|wc -l # =3D> 11 >> >> It looks like we have at least 16 more to go before we hit full language >> coverage. =C2=A0Perhaps we should use the empty cells in the "documentat= ion" >> column in the languages table at [1] as a sign up space for volunteers >> who would be willing to write a brief tutorial demonstrating usage of >> Org-mode with their favorite language. >> >> Moving forward this is likely something we could request of the >> contributors of new languages. >> >> Also, once the template above is finalized it should be posted on worg >> and linked to through the languages page. >> >>> >>> I'll be happy to work on this as I can. >>> >> >> Great, I don't anticipate having time to put towards this, although I'll >> be happy to help troubleshoot where I can. >> >> Cheers, >> >>> >>> All the best, >>> Tom >>> >>> >>> Eric Schulte writes: >>> >>>> Thanks for raising this point. =C2=A0The bulk of the content in the Ba= bel >>>> portion of worg is fairly old, predating the syntax standardization >>>> efforts this fall. =C2=A0I've just pushed some minor updates to the ma= in >>>> babel pages, but updating the language-specific tutorials and the >>>> individual use cases will be a much larger effort. >>>> >>>> I'm not sure how to proceed. =C2=A0One option would be to go through a= nd add >>>> a [uses deprecated syntax] tag to the top of each such page, which cou= ld >>>> be removed after the page has been checked and possibly updated to >>>> ensure consistency with the latest syntax. >>>> >>>> Given that the Babel syntax will not be changing significantly moving >>>> forward now would be a good time to do such a review. =C2=A0Ideally th= is >>>> could be completed before the release of Emacs 24 in a couple of month= s. >>>> >>>> Any other ideas for update/reorganization or volunteers? >>>> >>>> Cheers, >>>> >>>> tsd@tsdye.com (Thomas S. Dye) writes: >>>> >>>>> Hi Riccardo, >>>>> >>>>> Thanks for the URL. =C2=A0Org mode has evolved since this article was >>>>> written. =C2=A0It should probably be revised or taken off Worg. =C2= =A0I've copied >>>>> Eric Schulte, who is better able than me to determine the correct cou= rse >>>>> of action here. >>>>> >>>>> In the meantime, an up-to-date description of how Org mode can be use= d >>>>> to write literate programs has appeared in the Journal of Statistical >>>>> Software. =C2=A0You can find it here: http://www.jstatsoft.org/v46/i0= 3 >>>>> >>>>> Perhaps you could use the examples in the JSS article to get started? >>>>> If these don't work for you, or if they raise questions that are diff= icult >>>>> to answer, please do come back to the list with your queries. >>>>> >>>>> All the best, >>>>> Tom >>>>> >>>>> Riccardo Romoli writes: >>>>> >>>>>> Hi, this is the URL: >>>>>> >>>>>> http://orgmode.org/worg/org-contrib/babel/how-to-use-Org-Babel-for-R= .html >>>>>> >>>>>> Best >>>>>> R >>>>>> >>>>>> 2012/2/5 Thomas S. Dye >>>>>> >>>>>>> Hi Riccardo, >>>>>>> >>>>>>> This code appears to be outdated. =C2=A0I don't recall this code on= the org >>>>>>> site. =C2=A0Could you send a URL? >>>>>>> >>>>>>> All the best, >>>>>>> Tom >>>>>>> >>>>>>> Riccardo Romoli writes: >>>>>>> >>>>>>> > Hi, I'm trying to generate some figure with R, into an org sessio= n. >>>>>>> Firstly >>>>>>> > I use the code in the org site. The problem is that the code do n= ot >>>>>>> > generate any figure. >>>>>>> > >>>>>>> > This is the code: >>>>>>> > >>>>>>> > #+TITLE:Test >>>>>>> > #+AUTHOR: Your Name >>>>>>> > #+EMAIL: your-email@server.com >>>>>>> > #+BABEL: :session *R* :cache yes :results output graphics :export= s >>>>>>> > both :tangle yes >>>>>>> > >>>>>>> > * Example of Org-Babel for R Literate Programming >>>>>>> > ** R text output >>>>>>> > A simple summary. >>>>>>> > #+begin_src R >>>>>>> > =C2=A0 x <- rnorm(10) >>>>>>> > =C2=A0 summary(x) >>>>>>> > #+end_src >>>>>>> > >>>>>>> > ** R graphics output >>>>>>> > Note we use the object =3Dx=3D generated in previous code block, = thanks to >>>>>>> > the header option =3D:session *R*=3D. =C2=A0The output graphics f= ile is >>>>>>> > =3Da.png=3D. >>>>>>> > >>>>>>> > #+begin_src R =C2=A0:file a.png >>>>>>> > =C2=A0 y <- rnorm(10) >>>>>>> > =C2=A0 plot(x, y) >>>>>>> > #+end_src >>>>>>> > >>>>>>> > Same plot with larger dimension: >>>>>>> > >>>>>>> > #+begin_src R =C2=A0:file b.png :width 800 :height 800 >>>>>>> > =C2=A0 plot(x, y) >>>>>>> > #+end_src >>>>>>> > >>>>>>> > >>>>>>> > Where do I wrong? >>>>>>> > >>>>>>> > Best >>>>>>> > Riccardo >>>>>>> > Hi, I'm trying to generate some figure with R, into an org se= ssion. >>>>>>> Firstly I use the code in the org site. The problem is that the cod= e do not >>>>>>> generate any figure. This is the code: >>>>>>> > #+TITLE:Test >>>>>>> > #+AUTHOR: Your Name >>>>>>> > #+EMAIL: mailto:your-email@server.com >>>>>>> > #+BABEL: :session *R* :cache yes :results output graphics :export= s both >>>>>>> :tangle yes >>>>>>> > >>>>>>> > * Example of Org-Babel for R Literate Programming >>>>>>> > ** R text output >>>>>>> > A simple summary. >>>>>>> > #+begin_src R >>>>>>> > =C2=A0 x <- rnorm(10) >>>>>>> > =C2=A0 summary(x) >>>>>>> > #+end_src >>>>>>> > >>>>>>> > ** R graphics output >>>>>>> > Note we use the object =3Dx=3D generated in previous code block, = thanks to >>>>>>> > the header option =3D:session *R*=3D. =C2=A0The output graphics f= ile is >>>>>>> > =3Da.png=3D. >>>>>>> > >>>>>>> > #+begin_src R =C2=A0:file a.png >>>>>>> > =C2=A0 y <- rnorm(10) >>>>>>> > =C2=A0 plot(x, y) >>>>>>> > #+end_src >>>>>>> > >>>>>>> > Same plot with larger dimension: >>>>>>> > >>>>>>> > #+begin_src R =C2=A0:file b.png :width 800 :height 800 >>>>>>> > =C2=A0 plot(x, y) >>>>>>> > #+end_src >>>>>>> > Where do I wrong?BestRiccardo >>>>>>> >>>>>>> -- >>>>>>> Thomas S. Dye >>>>>>> http://www.tsdye.com >>>>>>> >>>>>> Hi, this is the URL:http://orgmode.org/worg/org-contrib/babel/how-to= -use-Org-Babel-for-R.htmlBestR >>>>>> 2012/2/5 Thomas S. Dye Hi Riccardo, >>>>>> >>>>>> >>>>>> This code appears to be outdated. =C2=A0I don't recall this code= on the org >>>>>> site. =C2=A0Could you send a URL? >>>>>> >>>>>> All the best, >>>>>> Tom >>>>>> >>>>>> Riccardo Romoli writes: >>>>>> >>>>>>> Hi, I'm trying to generate some figure with R, into an org sess= ion. Firstly >>>>>>> I use the code in the org site. The problem is that the code do not >>>>>>> generate any figure. >>>>>>> >>>>>>> This is the code: >>>>>>> >>>>>>> #+TITLE:Test >>>>>>> #+AUTHOR: Your Name >>>>>>> #+EMAIL: mailto:your-email@server.com >>>>>>> #+BABEL: :session *R* :cache yes :results output graphics :exports >>>>>>> both :tangle yes >>>>>>> >>>>>>> * Example of Org-Babel for R Literate Programming >>>>>>> ** R text output >>>>>>> A simple summary. >>>>>>> #+begin_src R >>>>>>> =C2=A0 x <- rnorm(10) >>>>>>> =C2=A0 summary(x) >>>>>>> #+end_src >>>>>>> >>>>>>> ** R graphics output >>>>>>> Note we use the object =3Dx=3D generated in previous code block, th= anks to >>>>>>> the header option =3D:session *R*=3D. =C2=A0The output graphics fil= e is >>>>>>> =3Da.png=3D. >>>>>>> >>>>>>> #+begin_src R =C2=A0:file a.png >>>>>>> =C2=A0 y <- rnorm(10) >>>>>>> =C2=A0 plot(x, y) >>>>>>> #+end_src >>>>>>> >>>>>>> Same plot with larger dimension: >>>>>>> >>>>>>> #+begin_src R =C2=A0:file b.png :width 800 :height 800 >>>>>>> =C2=A0 plot(x, y) >>>>>>> #+end_src >>>>>>> >>>>>>> >>>>>>> Where do I wrong? >>>>>>> >>>>>>> Best >>>>>>> Riccardo >>>>>>> Hi, I'm trying to generate some figure with R, into an org >>>>>>> session. Firstly I use the code in the org site. The problem is >>>>>>> that the code do not generate any figure. This is the code: >>>>>>> #+TITLE:Test >>>>>>> #+AUTHOR: Your Name >>>>>>> #+EMAIL: mailto:mailto:your-email@server.com >>>>>>> #+BABEL: :session *R* :cache yes :results output graphics :exports = both :tangle yes >>>>>>> >>>>>>> * Example of Org-Babel for R Literate Programming >>>>>>> ** R text output >>>>>>> A simple summary. >>>>>>> #+begin_src R >>>>>>> =C2=A0 x <- rnorm(10) >>>>>>> =C2=A0 summary(x) >>>>>>> #+end_src >>>>>>> >>>>>>> ** R graphics output >>>>>>> Note we use the object =3Dx=3D generated in previous code block, th= anks to >>>>>>> the header option =3D:session *R*=3D. =C2=A0The output graphics fil= e is >>>>>>> =3Da.png=3D. >>>>>>> >>>>>>> #+begin_src R =C2=A0:file a.png >>>>>>> =C2=A0 y <- rnorm(10) >>>>>>> =C2=A0 plot(x, y) >>>>>>> #+end_src >>>>>>> >>>>>>> Same plot with larger dimension: >>>>>>> >>>>>>> #+begin_src R =C2=A0:file b.png :width 800 :height 800 >>>>>>> =C2=A0 plot(x, y) >>>>>>> #+end_src >>>>>>> Where do I wrong?BestRiccardo >>>>>> >>>>>> -- >>>>>> Thomas S. Dye >>>>>> http://www.tsdye.com >>>>>> >> >> >> Footnotes: >> [1] =C2=A0http://orgmode.org/worg/org-contrib/babel/languages.html > > -- > Thomas S. Dye > http://www.tsdye.com >