emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] org-exp-blocks: what about previewing blocks ?


From: Eric Schulte
Subject: Re: [Orgmode] org-exp-blocks: what about previewing blocks ?
Date: Fri, 28 Aug 2009 10:06:20 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)

Carsten Dominik <address@hidden> writes:

> Hi Eric,
>
> this sounds like a great alternative, thanks.
>
> I wonder if we should consider some cashing of images, also
> for export.  I think we could have an alist with sha1 hashes as keys
> and image files as values.  The sha1 hash could be made from the
> entire code and the command that is used to create the image..
>

Hi Carsten,

That sounds like a very good idea.  Currently Org-babel caches results
using a much simpler scheme (only run the block if there are no results
in the buffer), but what you recommend would be an efficient way of
noticing if the command has changed.  When discussing this previously we
had only considered approaches using the date of execution.

I'll add this idea to the org-babel tasks.

Thanks! -- Eric

ps. does Org-mode already have a method of generating sha1 hashes?  I
    just did an `elisp-index-search' for sha1 and nothing came up.

>
> - Carsten
>
> On Aug 27, 2009, at 8:51 PM, Eric Schulte wrote:
>
>> I don't have any plans to add previewing to org-exp-blocks, however
>> there is an alternative.
>>
>> Org-babel provides for the evaluation and viewing of the results of
>> blocks in Org-mode documents.  As such, it is possible to use Org-
>> babel
>> to preview the output of blocks.  For example, with Org-babel
>> installed
>> [1] calling C-c C-c on the following block will evaluate the block
>> placing a link to the resulting file into the Org-mode document.
>> Subsequently calling C-c C-o with the point on the block will find the
>> link and open it previewing the image.
>>
>> --8<---------------cut here---------------start------------->8---
>> #+begin_src ditaa :file images/blue.png :cmdline -r
>> +---------+
>> | cBLU    |
>> |         |
>> |    +----+
>> |    |cPNK|
>> |    |    |
>> +----+----+
>> #+end_src
>> --8<---------------cut here---------------end--------------->8---
>>
>> Hopefully in the near future Org-babel should be stable enough to
>> justify an initial release, which should include an instructional page
>> on worg.
>>
>> Best -- Eric
>>
>> Footnotes:
>> [1]  http://eschulte.github.com/org-babel/#getting-started
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> =======================
> PLEASE NOTE NEW ADDRESS
> =======================
> prof.dr. Carsten Dominik                              address@hidden
> Astronomical Institute 'Anton Pannekoek'              
> www.astro.uva.nl/~dominik
> Faculty of Science, University of Amsterdam           phone   
> +31-20-5257477/7491
> SCIENCE PARK 904, ROOM C4-106                 fax     +31-20-5257484
> 1098 XH Amsterdam, The Netherlands
> mail: PO BOX 94249, 1090GE, Amsterdam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]