From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AAAEKUqHeGAbNQAAgWs5BA (envelope-from ) for ; Thu, 15 Apr 2021 20:34:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kNrWIkqHeGDPHQAAB5/wlQ (envelope-from ) for ; Thu, 15 Apr 2021 18:34:50 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F0325872F for ; Thu, 15 Apr 2021 20:34:49 +0200 (CEST) Received: from localhost ([::1]:58162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lX6pF-0005xC-3B for larch@yhetil.org; Thu, 15 Apr 2021 14:34:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX6nv-0005co-MU for emacs-orgmode@gnu.org; Thu, 15 Apr 2021 14:33:27 -0400 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:43874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lX6nt-0005Q7-9s for emacs-orgmode@gnu.org; Thu, 15 Apr 2021 14:33:27 -0400 Received: by mail-ot1-x32e.google.com with SMTP id o13-20020a9d404d0000b029028e0a0ae6b4so4417261oti.10 for ; Thu, 15 Apr 2021 11:33:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=KBvwWO3WQQ/kCxNNIuOBDAWUIKdhaJoQW08QNsSgvS8=; b=hOlps8mA3QlnswTykEN4oPpyAbRlaARbbIjcdQRwdHNEK7JvtxpSsTfwYaUCDb9aC9 lRu37+3nFGjylA9vtZnVl5Qakn4eFzmNQ6wzHIVzHZy/Twnv/6HyOm4CgxWCC0G7ShSm lxipIZTEFFsUFvSbPi9rvvD+k/H7Kp2sE42gEY03mBtPolOb9m9ujv3HDlW4uUIB0i86 E0Qdh7ldrN+E8RtGRWwBBkAtwmn5G4TWbXhbKsvcUjCuphBJromz/PNHiRk4NDshb84R U0EXqopy6fKcgViZxdtkRgCSC3R2OYYYR5PWNCyIlMV/X+OX5N2hwPH/g3/gZDPC/+ss uFvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=KBvwWO3WQQ/kCxNNIuOBDAWUIKdhaJoQW08QNsSgvS8=; b=aGn2CFxcvfAnFNDGyj8prm9e58noLr/OoChQliywjxbItrKyjL7UvnOU+zBw3PQIST dH+rHqMTOO97T1Tellv27vOy5cWhzdvBetXcIACkcPv/+f+BjpwqfprqeMbEYHyxAywm gMiYapQQmeDDBx+FgK3vyOzxRT2TVYqWb3lfabi0hipHLyw1ShaSkz6O5EhNDr3VZal3 /Pu5qnCgXlcZU8Ylaw9HE3PNPXFD9qH+7P/CSuMjM3lCTaaePk3uEx3g/TG6NrwRCFAB L48G5AltK6DfBpZwI6+jYLzPcacVrw1UiuBA8tv5NM/vCo9cX3eTjrV67yzBOvh6W+9V 0LLQ== X-Gm-Message-State: AOAM530+RlhsoSKvCxX9K3LT6lTKlnwcuYHhWJUwDGYjdVvouvbc0vMH CrUaJRiLXJfY1vVvxyBJd4eqUIlaOk3uMqxIjJ1PjNNjdG4= X-Google-Smtp-Source: ABdhPJwgihunXBJfAOHXmCaCKPGxedefHn37Y69ByvR3NKcIN6renRFHdeI89Oecs+rUqfIP6iM4z5Jxh0hP186UM9Q= X-Received: by 2002:a05:6830:1e7a:: with SMTP id m26mr533988otr.68.1618511603470; Thu, 15 Apr 2021 11:33:23 -0700 (PDT) MIME-Version: 1.0 References: <87a6q12019.fsf@europa> In-Reply-To: From: George Mauer Date: Thu, 15 Apr 2021 13:33:13 -0500 Message-ID: Subject: Re: plantuml, png and caching To: emacs-orgmode Content-Type: multipart/alternative; boundary="00000000000030933e05c007196b" Received-SPF: pass client-ip=2607:f8b0:4864:20::32e; envelope-from=gmauer@gmail.com; helo=mail-ot1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: gmauer@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618511690; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KBvwWO3WQQ/kCxNNIuOBDAWUIKdhaJoQW08QNsSgvS8=; b=n58BpNA/B2XdGZI7TeCpf5fnbNXvreHPVKWiNWWDryA4oqw/pIyfybm2wE7senAD42JAGX Xbc6nsI/lsEL7gfURnaBbM9ou9lEmwlJDAk3mdY5lcv0dDYuMx7Y5sCmc+uZ0UrDUoGzde 1/If0KIEmzA4ytI61Ox/R9UqzVkSDh1coaa9u+jmfWyNr9i7sp9mDek77ME3xEY/db+Zb5 p0ZgjrCSq3OCyRzJWTaiDs/GfI6Je6JToqO5Atu5lqRKS0InvGkXkQl5Dxyx75McX0JFwK lwOQb+0wjTCn9nGZ0+r8cXike0VZFbXX4I790d0eh1NWqnmGgJI8LyJu5c37iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618511690; a=rsa-sha256; cv=none; b=hhuusDxFaVescEjh6X907Dk8qZGdbJ12bHIhRLd2QHTNSrGpUdD9HKpQItsH75BGctyFOM a+kgouw4WBN+MpGK9HYgKDWjELpCFApY0Xyq5WTcmrViMeUl2ZTtxJXxqazprB6oqaNjIM rQmOJn4r4sQMStG8SFlQYBJTbWdTnDVaIc0mQtk0Ti1wIfZo4Zok9DMaUy8ZzMEuq443OC 7vinosRslLmo9PJ7NZi6tJ20SmA/7zjuKVmM/dZh//XGtYktQKvEK3Ko0d2sjilHQBdbCT ZgPDHLKdl8F/6J/JDVdfa78lQWWco5qZ3+rLqOL79z9QOuE0Jllcc/3zuC4eeg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=hOlps8mA; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=hOlps8mA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: F0325872F X-Spam-Score: -3.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: eE8BP1srd8Yc --00000000000030933e05c007196b Content-Type: text/plain; charset="UTF-8" I would expect it to work. After all, it could be incredibly useful to bump that up to a :header-args:plantuml: property on the heading On Thu, Apr 15, 2021 at 12:48 PM CS Suehs wrote: > Nick, > I had the :cache yes on the same line with #+BEGIN like > #+BEGIN_SRC plantuml :file helloworld.png :cache yes > > When I change to your method, caching seems to work. > It looks like setting it as a section property also works. > > Thank you. > Should I expect the setting on the BEGIN_SRC line to work? > > On Tue, Apr 13, 2021 at 7:16 PM Nick Daly > wrote: > > > > CS Suehs writes: > > > > > Should I expect PlantUML source blocks and their resulting images to > > > be cached and respect `:cache true` ? > > > > Yes. > > > > > In my experience they regenerate every export, even with :cache true. > > > > Can you provide an example? > > > > This example caches correctly for me on v9.1.14. > > > > #+name: helloworld > > #+header: :cache yes > > #+BEGIN_SRC plantuml :file helloworld.png > > @startuml > > Hello --> World > > @enduml > > #+END_SRC > > > > #+RESULTS[f29ead8751dde1b4c4ee1b8fcb97e133c75eed0d]: helloworld > > [[file:helloworld.png]] > > > > The only time I've seen caching break is if the diagram imports an > > external file. In that case, the diagram doesn't regenerate often > > enough, because org doesn't notice that the external file changed. The > > fix to that is to include the hash of the external file as a dependent > > var. > > > > #+name: md5 > > #+BEGIN_SRC shell :cache no :var afile="PLACEHOLDER" > > md5sum $afile > > #+END_SRC > > > > #+name: cache-correctly > > #+header: :var md5input=md5("data.txt") > > #+BEGIN_SRC R :exports results :results output graphics :file > data.svg > > aData <- read.csv("data.txt") > > ggplot(data = aData, > > mapping = aes(x = aData$id, y = aData$value)) > > #+END_SRC > > > > Thanks, > > Nick > > --00000000000030933e05c007196b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I would expect it to work. After all, it could be incredib= ly useful to bump that up to a :header-args:plantuml: property on the headi= ng

On Thu, Apr 15, 2021 at 12:48 PM CS Suehs <skelter.net@gmail.com> wrote:
Nick,
I had the :cache yes on the same line with #+BEGIN like
#+BEGIN_SRC plantuml :file helloworld.png :cache yes

When I change to your method, caching seems to work.
It looks like setting it as a section property also works.

Thank you.
Should I expect the setting on the BEGIN_SRC line to work?

On Tue, Apr 13, 2021 at 7:16 PM Nick Daly
<nick+orgmode@despisinggravity.com> wrote:
>
> CS Suehs <skelter.net@gmail.com> writes:
>
> > Should I expect PlantUML source blocks and their resulting images= to
> > be cached and respect `:cache true` ?
>
> Yes.
>
> > In my experience they regenerate every export, even with :cache t= rue.
>
> Can you provide an example?
>
> This example caches correctly for me on v9.1.14.
>
>=C2=A0 =C2=A0 =C2=A0#+name: helloworld
>=C2=A0 =C2=A0 =C2=A0#+header: :cache yes
>=C2=A0 =C2=A0 =C2=A0#+BEGIN_SRC plantuml :file helloworld.png
>=C2=A0 =C2=A0 =C2=A0 =C2=A0@startuml
>=C2=A0 =C2=A0 =C2=A0 =C2=A0Hello --> World
>=C2=A0 =C2=A0 =C2=A0 =C2=A0@enduml
>=C2=A0 =C2=A0 =C2=A0#+END_SRC
>
>=C2=A0 =C2=A0 =C2=A0#+RESULTS[f29ead8751dde1b4c4ee1b8fcb97e133c75eed0d]= : helloworld
>=C2=A0 =C2=A0 =C2=A0[[file:helloworld.png]]
>
> The only time I've seen caching break is if the diagram imports an=
> external file.=C2=A0 In that case, the diagram doesn't regenerate = often
> enough, because org doesn't notice that the external file changed.= =C2=A0 The
> fix to that is to include the hash of the external file as a dependent=
> var.
>
>=C2=A0 =C2=A0 =C2=A0#+name: md5
>=C2=A0 =C2=A0 =C2=A0#+BEGIN_SRC shell :cache no :var afile=3D"PLAC= EHOLDER"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0md5sum $afile
>=C2=A0 =C2=A0 =C2=A0#+END_SRC
>
>=C2=A0 =C2=A0 =C2=A0#+name: cache-correctly
>=C2=A0 =C2=A0 =C2=A0#+header: :var md5input=3Dmd5("data.txt")=
>=C2=A0 =C2=A0 =C2=A0#+BEGIN_SRC R :exports results :results output grap= hics :file data.svg
>=C2=A0 =C2=A0 =C2=A0 =C2=A0aData <- read.csv("data.txt") >=C2=A0 =C2=A0 =C2=A0 =C2=A0ggplot(data =3D aData,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mapping =3D aes(x =3D = aData$id, y =3D aData$value))
>=C2=A0 =C2=A0 =C2=A0#+END_SRC
>
> Thanks,
> Nick

--00000000000030933e05c007196b--