From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francesco Pizzolante Subject: Re: [PATCH] sha1 hash of latex fragments to avoid regeneration Date: Mon, 07 Dec 2009 13:48:22 +0100 Message-ID: <87ljhfuezt.fsf@missioncriticalit.com> References: <6978E5D0-BBB7-4B45-8270-11FDE93F6726@gmail.com> <87ws15zmsm.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Eric Schulte's message of "Sat, 05 Dec 2009 09:35:35 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: Eric Schulte Cc: mailing-list-org-mode Eric, > Would it be possible to switch from using org-exp-blocks to using > org-babel? If so then you could use org-babel's caching which does > *not* affect the exported file name, but rather saves a sha1 key as > (mostly) hidden text in the org-mode buffer. > > so for example > > #+BEGIN_ditaa procedure.png > +-----------------+ > | Example | > | | > | +---------+ | > | | | | > | | | | > | +---------+ | > +-----------------+ > #+END_ditaa > > would be written as > > #+begin_src ditaa :file procedure.png :cache :exports results > +-----------------+ > | Example | > | | > | +---------+ | > | | | | > | | | | > | +---------+ | > +-----------------+ > #+end_src > > and pressing C-cC-c on the block (or exporting) would result in the > insertion of a link to the resulting image into the org-mode buffer > behind a results line as follows -- only in org most of the hash is > hidden. > > #+results[bdffac60833c9f925a52bd6617dace39832b7dda]: > [[file:procedure.png]] I don't see any problem in using org-babel. The only issues I see with this solution are the following: - when you export, no #+results line is added to the org-mode buffer; - you, thus, have to do the C-cC-c at least once in your block to generate the #+results line; - when you export (to LaTeX or PDF), the image is always re-computed (no caching mechanism is used), while doing C-cC-c, the caching is used. Can you confirm these points? > My problem with your proposed solution is that it entails storing > information *outside* of the org-mode buffer -- which granted we are > already doing although in a less dramatic way. The creation of external > files whose sole purpose is to save a hash in their filename strikes me > as wasteful/messy. I agree with your point. I was "simply" trying to reuse what has been done for the caching of images in org. The org-babel solution is more elegant. Thanks, F. _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode