From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OhAlCp58eGBWPgEAgWs5BA (envelope-from ) for ; Thu, 15 Apr 2021 19:49:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EMRjO518eGDSCQAA1q6Kng (envelope-from ) for ; Thu, 15 Apr 2021 17:49:17 +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 C772927810 for ; Thu, 15 Apr 2021 19:49:17 +0200 (CEST) Received: from localhost ([::1]:43854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lX67A-0001ah-HA for larch@yhetil.org; Thu, 15 Apr 2021 13:49:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX65A-0001Zd-DA for emacs-orgmode@gnu.org; Thu, 15 Apr 2021 13:47:14 -0400 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:45882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lX655-0006Y9-8u for emacs-orgmode@gnu.org; Thu, 15 Apr 2021 13:47:12 -0400 Received: by mail-qv1-xf2e.google.com with SMTP id bs7so11614231qvb.12 for ; Thu, 15 Apr 2021 10:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x6jeNzEw2BCfNe4cqnw8i4G0SJ3UdQWxe4OGlFL035k=; b=UP/0ZmDAufKYX4Fz7DufEeCOx6jIndj5JVXkQ5xwhgQqYOXiIz0DKzZa4WKWj2beIU lGunXhvgwYKDOgV4BRX9vH50P+wdNSYUaS8Ub5nMFXiQgEzJ5lYuob1KAzVdsd1sf+R2 4n/eYr9mEMSAM3NuzDbQ+msyyegd6GDostVJgYfAvBIliGQ8qBXq1z7mRtcnVNa+tXeq 2r6+Fx7RFmn5UX4uARVJmOrjAyuH9wQHVWD8HYbGN963H0OI4sX3De0IZ9UL35Pt0ERu IltbQqtyQjlW7WM3J1WHF8yb+9oPRSsNce20RL7+/rJCCsLBwIHUGu9o7vRTMs+fsLJW pboQ== 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:from:date :message-id:subject:to:cc; bh=x6jeNzEw2BCfNe4cqnw8i4G0SJ3UdQWxe4OGlFL035k=; b=OZ2rYMHnB2GXOyZ3JMJMPNLcfPryqvXTXxdYkNu8UQ8mvFCxlu4K6lPvPl/CZhquEL QvOPuC0J56P9ZVz9CYY/TcHJyUaHhjBr4bcAoA8ZojEZnRPWYZ31iroVCJQXJOG58HLI fzR8Un9qQa75IFMZoyQDua3phW5Op/KcmZgsI85XVWJhDJSPvR7SffBYTgHrULg+k1NL MurWRByOQ3qsrs/iESaqxzlw+OLclV81NCHo5s0g833JaVHwGhjmMMUL43QEqWbtgPQp UavV5RtCRPx52EBXwDoLZ49p4pvwk7itFH43grAeA5VEstj3+VKQ3mMVnjnLdZC4HaHR WMrQ== X-Gm-Message-State: AOAM530uxIVvZe0oAdNzcOUfsJwlGIsHkT1oiTKRq0FmwvrYTCWkVYci jrnvaQs4Zjs946tV6lcbBtl7O1sWKhX+nHYDyc8= X-Google-Smtp-Source: ABdhPJyxlJ7oZwycBsyJNyqzjBVyDd+BdTWI91fhFRM3T+eemqQN8U1JAUH+0t7v1X2qgqr9pHDfniX5fiPJ7Ux3pjM= X-Received: by 2002:ad4:4210:: with SMTP id k16mr4323399qvp.30.1618508824512; Thu, 15 Apr 2021 10:47:04 -0700 (PDT) MIME-Version: 1.0 References: <87a6q12019.fsf@europa> In-Reply-To: <87a6q12019.fsf@europa> From: CS Suehs Date: Thu, 15 Apr 2021 12:46:53 -0500 Message-ID: Subject: Re: plantuml, png and caching To: Nick Daly Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=skelter.net@gmail.com; helo=mail-qv1-xf2e.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, 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: C772927810 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: vLysr1usRITg 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