From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: are babel python sessions and inlined images incompatible? Date: Sat, 27 Apr 2013 08:40:14 +0200 Message-ID: <86bo90zdbl.fsf@somewhere.org> References: <8738uhmget.fsf@gmail.com> <86ehdzzlih.fsf@somewhere.org> <86r4hzgisn.fsf@somewhere.org> <86bo911l7j.fsf@somewhere.org> <87k3noo5cr.fsf@Rainer.invalid> 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 Hi Achim, Achim Gratz wrote: > Sebastien Vauban writes: >> Would we want to abstract the above, I guess we should generalize the >> languages families as: >> >> - graphics-only languages (ditaa, dot, gnuplot, etc.) >> >> - general-purpose languages with graphical capacities (R, maxima, octave... >> and, at least, python[1] IIUC) >> >> - general-purpose languages without graphical capacities (sql, sh, etc.) > > This is something of a non-starter as all generalizations are false. > > Babels notion of graphics is simply that after execution of the source > block it expects to be able to find a file that looks like it has a > graphics format in it (and its notion of results is that it gets > something from standard output that conforms to certain rules that are > changeable by header arguments). > > A "graphics-only" language would be one that could only write files, but > Babel can easily transcend that limitation and pretend it had gotten a > result instead. It might even filter the result to convert between > formats. Conversely, a language that cannot write files could have an > implementation where Babel constructs the file to put in the graphics > link in Org from the output of the program. Existing Babel language > implementations already use both mechanisms. My idea was simply to ensure that all similar languages share the same set of header arguments, which is not the case, as of today, with python (no support for ":results graphics"). But I get your point. Best regards, Seb -- Sebastien Vauban