From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: are babel python sessions and inlined images incompatible? Date: Thu, 25 Apr 2013 06:27:03 -1000 Message-ID: References: <8738uhmget.fsf@gmail.com> <86ehdzzlih.fsf@somewhere.org> <86r4hzgisn.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVP1E-0005i8-S4 for emacs-orgmode@gnu.org; Thu, 25 Apr 2013 12:27:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVP19-0004da-De for emacs-orgmode@gnu.org; Thu, 25 Apr 2013 12:27:36 -0400 Received: from plane.gmane.org ([80.91.229.3]:60497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVP19-0004cz-40 for emacs-orgmode@gnu.org; Thu, 25 Apr 2013 12:27:31 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UVP0z-0003bP-Cx for emacs-orgmode@gnu.org; Thu, 25 Apr 2013 18:27:21 +0200 In-Reply-To: <86r4hzgisn.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 25 Apr 2013 09:40:08 +0200") 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: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org Aloha Seb, "Sebastien Vauban" writes: > > Well, I *now* know it's not described in the Org manual... > > =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 http://lists.gnu.org/arch= ive/html/emacs-orgmode/2013-03/msg01181.html > =E2=94=82 > =E2=94=82 - :results graphics makes the list even longer, yes? :-) I'm= not > =E2=94=82 sure that every language supports it and I don't believe it= 's > =E2=94=82 currently in the manual. > =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > > Though, it's described in many different posts on this ML, and in some > tutorials on Worg... > > =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 http://orgmode.org/worg/o= rg-contrib/babel/languages/ob-doc-R.html > =E2=94=82 > =E2=94=82 If a :file filename.ext header argument is provided to an R s= ource > block, then > =E2=94=82 the output from the source block will go to the named file. W= hat that output > =E2=94=82 is depends on the value of the :results header argument. > =E2=94=82 > =E2=94=82 If the value is :results graphics then "base" graphics output= is captured on > =E2=94=82 disk, and a link to the graphics file is inserted into the Org > Mode buffer (as > =E2=94=82 is also the case with the graphics-only languages such as gnu= plot, > ditaa, dot, > =E2=94=82 and asymptote.) > =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > > I thought it was a "core" option value for all general-purpose languages = (e.g. > emacs-lisp, python, R, ruby, sh), required when your code block outputs a > graphics. > > After checking, I only found it in those files: > > ./ob-maxima.el:117: (and (member "graphics" (cdr (assq :result-params pa= rams))) > ./ob-octave.el:272: (and (member "graphics" (cdr (assq :result-params pa= rams))) > ./ob-R.el:234: (and (member "graphics" (cdr (assq :result-params params)= )) The language documentation on Worg, such as http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html, is meant to be documentation, rather than tutorial. It is structured this way so the manual doesn't need to be updated every time support for a new language is added, or changes are made to a language-specific file. The template for this documentation includes a slot for default header arguments and also one for language-specific header arguments, because these are often changed by the language-specific modules. I think the hope and expectation is that the user community take over the tasks of creating and tending the language-specific code. If :results graphics makes good sense for Python, then users should feel free to add it to ob-python.el. With the examples you point out, it shouldn't be too difficult. hth, Tom =20 --=20 Thomas S. Dye http://www.tsdye.com