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

2009-08-28 Thread Eric Schulte
Carsten Dominik  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.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> ===
> PLEASE NOTE NEW ADDRESS
> ===
> prof.dr. Carsten Dominik  domi...@uva.nl
> 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


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-08-28 Thread Carsten Dominik

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..

- 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.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


===
PLEASE NOTE NEW ADDRESS
===
prof.dr. Carsten Dominikdomi...@uva.nl
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






___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-08-27 Thread Eric Schulte
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.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-08-27 Thread Carsten Dominik

Hi Nicolas,

while this would be great, I don't see any movement in this
direction, so for now I am closing this thread in my TODO folder

- Carsten

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 ?

Nicolas
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


===
PLEASE NOTE NEW ADDRESS
===
prof.dr. Carsten Dominikdomi...@uva.nl
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






___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-26 Thread Eric Schulte
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


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-25 Thread Carsten Dominik


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?

No principal objections, of course.

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-25 Thread Eric Schulte
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.

Thanks -- Eric


>
> - Carsten
>
>
>>
>> Nicolas
>> ___
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> ___
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-19 Thread Carsten Dominik


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.

- Carsten




Nicolas
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-18 Thread Nicolas Girard
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 ?

Nicolas
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-18 Thread 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?

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-18 Thread 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?

- Carsten



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


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

2009-06-16 Thread Nicolas Girard
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 ?

Cheers,
Nicolas


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode