emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Avoiding recompilation of ditaa ASCII if unmodified between exports
@ 2015-04-24  0:28 Rob Stewart
  2015-04-24  5:48 ` Loris Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Stewart @ 2015-04-24  0:28 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I really appreciate the integration with ditaa and org mode.
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html

I have an Org mode document with 5 ditaa diagrams, and exporting my
Org file is taking quite a long time, about 10 seconds to compile 5
ditaa diagrams + HTML export.

At the moment, even if I don't modify any of the ditaa ASCII, all 5
are compiled from ASCII to a PNG. Is there a way ask ditaa to only
generate a new PNG file if the contents of the `#+BEGIN_SRC ditaa`
have changed?

Thanks,

--
Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Avoiding recompilation of ditaa ASCII if unmodified between exports
  2015-04-24  0:28 Avoiding recompilation of ditaa ASCII if unmodified between exports Rob Stewart
@ 2015-04-24  5:48 ` Loris Bennett
  2015-04-24  8:46   ` Rob Stewart
  0 siblings, 1 reply; 6+ messages in thread
From: Loris Bennett @ 2015-04-24  5:48 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Rob Stewart <robstewart57@gmail.com> writes:

> Hi,
>
> I really appreciate the integration with ditaa and org mode.
> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html
>
> I have an Org mode document with 5 ditaa diagrams, and exporting my
> Org file is taking quite a long time, about 10 seconds to compile 5
> ditaa diagrams + HTML export.
>
> At the moment, even if I don't modify any of the ditaa ASCII, all 5
> are compiled from ASCII to a PNG. Is there a way ask ditaa to only
> generate a new PNG file if the contents of the `#+BEGIN_SRC ditaa`
> have changed?
>
> Thanks,
>
> --
> Rob

I think you want to look at caching:

http://orgmode.org/manual/cache.html

Cheers,

Loris

-- 
This signature is currently under construction.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Avoiding recompilation of ditaa ASCII if unmodified between exports
  2015-04-24  5:48 ` Loris Bennett
@ 2015-04-24  8:46   ` Rob Stewart
  2015-04-24  9:28     ` Loris Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Stewart @ 2015-04-24  8:46 UTC (permalink / raw)
  To: Loris Bennett, emacs-orgmode

Hi Loris,

On 24 April 2015 at 06:48, Loris Bennett <loris.bennett@fu-berlin.de> wrote:

> I think you want to look at caching:
>
> http://orgmode.org/manual/cache.html

Thanks for the tip. Interestingly, caching doesn't seem to work for
ditaa blocks. E.g.

--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC ditaa :file images/hello-world-round.png :cache yes
+--------------+
|              |
| Hello World! |
|              |
+--------------+
#+END_SRC
--8<---------------cut here---------------end--------------->8---

Run the ditaa.jar file every time I export to HTML with `C-c C-e h h`.

Does `:cache yes` only work for particular source languages?

--
Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Avoiding recompilation of ditaa ASCII if unmodified between exports
  2015-04-24  8:46   ` Rob Stewart
@ 2015-04-24  9:28     ` Loris Bennett
  2015-04-24  9:38       ` Rob Stewart
  0 siblings, 1 reply; 6+ messages in thread
From: Loris Bennett @ 2015-04-24  9:28 UTC (permalink / raw)
  To: emacs-orgmode

Hi Rob,

Rob Stewart <robstewart57@gmail.com> writes:

> Hi Loris,
>
> On 24 April 2015 at 06:48, Loris Bennett <loris.bennett@fu-berlin.de> wrote:
>
>> I think you want to look at caching:
>>
>> http://orgmode.org/manual/cache.html
>
> Thanks for the tip. Interestingly, caching doesn't seem to work for
> ditaa blocks. E.g.
>
> #+BEGIN_SRC ditaa :file images/hello-world-round.png :cache yes
> +--------------+
> |              |
> | Hello World! |
> |              |
> +--------------+
> #+END_SRC
>
> Run the ditaa.jar file every time I export to HTML with `C-c C-e h h`.
>
> Does `:cache yes` only work for particular source languages?

Caching with ditaa works for me with Emacs 24.4.1 and Org
8.2.10-37-gc000e8-elpaplus.

What versions of Org/Emacs are you using?

Cheers,

Loris

-- 
This signature is currently under construction.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Avoiding recompilation of ditaa ASCII if unmodified between exports
  2015-04-24  9:28     ` Loris Bennett
@ 2015-04-24  9:38       ` Rob Stewart
  2015-04-24 17:46         ` Charles C. Berry
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Stewart @ 2015-04-24  9:38 UTC (permalink / raw)
  To: Loris Bennett; +Cc: emacs-orgmode

Hi Loris,

> Caching with ditaa works for me with Emacs 24.4.1 and Org
> 8.2.10-37-gc000e8-elpaplus.
>
> What versions of Org/Emacs are you using?

Org-mode version 8.3beta release_8.3beta-1028-g0865cb
GNU Emacs 24.4.1

--
Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Avoiding recompilation of ditaa ASCII if unmodified between exports
  2015-04-24  9:38       ` Rob Stewart
@ 2015-04-24 17:46         ` Charles C. Berry
  0 siblings, 0 replies; 6+ messages in thread
From: Charles C. Berry @ 2015-04-24 17:46 UTC (permalink / raw)
  To: Rob Stewart; +Cc: Loris Bennett, emacs-orgmode

On Fri, 24 Apr 2015, Rob Stewart wrote:

> Hi Loris,
>
>> Caching with ditaa works for me with Emacs 24.4.1 and Org
>> 8.2.10-37-gc000e8-elpaplus.
>>
>> What versions of Org/Emacs are you using?
>
> Org-mode version 8.3beta release_8.3beta-1028-g0865cb
> GNU Emacs 24.4.1

Use org-babel-execute-src-block or org-babel-execute-buffer first to get 
the results and the cache sha in your buffer.

The exporter runs babel in a copy buffer, so caching done there is 
irrelevant.

HTH,

Chuck

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-24 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-24  0:28 Avoiding recompilation of ditaa ASCII if unmodified between exports Rob Stewart
2015-04-24  5:48 ` Loris Bennett
2015-04-24  8:46   ` Rob Stewart
2015-04-24  9:28     ` Loris Bennett
2015-04-24  9:38       ` Rob Stewart
2015-04-24 17:46         ` Charles C. Berry

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).