From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: org-exp-blocks: what about previewing blocks ? Date: Fri, 26 Jun 2009 10:16:09 -0700 Message-ID: References: <51b0095d0906161740n23379dbbtdf919aa3e8a4ea4a@mail.gmail.com> <51b0095d0906180232j3489705dndcc7d458d5a078af@mail.gmail.com> <08E74544-CC3D-4AEA-B5C2-76826E46766A@gmail.com> <08136B46-C923-4540-90E1-BD5850745F80@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKF2B-0000yK-Vj for emacs-orgmode@gnu.org; Fri, 26 Jun 2009 13:16:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKF27-0000vS-EZ for emacs-orgmode@gnu.org; Fri, 26 Jun 2009 13:16:19 -0400 Received: from [199.232.76.173] (port=46263 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKF27-0000vB-0u for emacs-orgmode@gnu.org; Fri, 26 Jun 2009 13:16:15 -0400 Received: from rv-out-0708.google.com ([209.85.198.240]:33672) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKF26-0008Mz-Ce for emacs-orgmode@gnu.org; Fri, 26 Jun 2009 13:16:14 -0400 Received: by rv-out-0708.google.com with SMTP id k29so1089782rvb.6 for ; Fri, 26 Jun 2009 10:16:13 -0700 (PDT) In-Reply-To: <08136B46-C923-4540-90E1-BD5850745F80@gmail.com> (Carsten Dominik's message of "Fri, 26 Jun 2009 06:17:51 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org Carsten Dominik writes: > On Jun 26, 2009, at 2:59 AM, Eric Schulte wrote: > >> Carsten Dominik writes: >> >>> On Jun 18, 2009, at 11:32 AM, Nicolas Girard wrote: >>> >>>> 2009/6/18 Carsten Dominik >>>> >>>> On Jun 17, 2009, at 2:40 AM, Nicolas Girard wrote: >>>> >>>> Hi all, >>>> >>>> currently the code in org-exp-blocks is intended for pre-processing >>>> only. >>>> It seems to me like org-mode would gain a very powerful feature, if >>>> blocks could also be previewed in their own buffer, using the same >>>> mechanism as the org-format-latex function. >>>> What do you think ? >>>> >>>> I don't see how this could be done in a general way. I guess you >>>> mean in particular >>>> the graphics blocks like ditaa? >>>> >>>> Yes. For any block type bt, if it makes sense, it would be possible >>>> to write such org-block--generate-image(body) that takes the >>>> block as argument and returns the path of the image it produced. >>>> >>>> Then: >>>> - for exporting: the existing org-export-blocks-format- >>>> functions would simply call their respective >>>> org-block--generate- >>>> image and work the same ; >>>> - for previewing a block of type : if such org-block-- >>>> generate-image exists, call it and display it the same way org- >>>> format-latex does >>>> >>>> Wouldn't it be great ? >>> >>> Yes, it would be. First you will need to talk Eric Schulte into >>> splitting the image generation functions into separate functions. >>> The I could look into the preview functionality. >>> >> >> I recently sent out an email announcement of development on org-babel >> which should provide a unified backend for evaluating source-code >> contained in org-mode blocks. If org-exp-blocks is using org-babel >> for >> it's source-code evaluation the ability to interactively evaluate >> blocks >> will come for free. This would be my preference rather than >> implementing a new code-evaluation schema for org-exp-blocks. >> >> I suppose that this would assume that org-babel is accepted into the >> core of org-mode (for it to be a requirement of org-exp-blocks which >> is >> now part of the org-mode core). While this would be my preference, it >> is certainly not my decision to make, and I honestly haven't given it >> much thought up until this point. > > From your post yesterday, without looking closer at org-babel, > it sounded to me that it is still under heavy development, > so maybe it is too early for the core at this moment? > Yes, I am very much in agreement that it is too soon to contemplate moving org-babel into the core. The intended point of my aside above is that I don't plan on adding interactive evaluation directly to org-exp-blocks. Thanks -- Eric > > No principal objections, of course. > > - Carsten