emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Francesco Pizzolante <fpz@missioncriticalit.com>
Cc: mailing-list-org-mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] sha1 hash of latex fragments to avoid regeneration
Date: Wed, 23 Dec 2009 08:17:38 -0700	[thread overview]
Message-ID: <87aax9u3cd.fsf@gmail.com> (raw)
In-Reply-To: <87ljhfuezt.fsf@missioncriticalit.com> (Francesco Pizzolante's message of "Mon, 07 Dec 2009 13:48:22 +0100")

Hi Francesco,

Francesco Pizzolante <fpz@missioncriticalit.com> writes:

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

Yes, this is true, and this is how I generally do development with
Org-babel.  In most cases I'd rather generate the image with C-cC-c and
preview the image with C-cC-o before exporting the document.  My most
common setup is to construct source-code blocks like the following

--8<---------------cut here---------------start------------->8---
#+begin_src ditaa :file data/example.png :exports none
    +------------------+
    |  ditaa example   |
    |                  |
    |                  |
    +------------------+
#+end_src

#+results:
[[file:data/example.png]]
--8<---------------cut here---------------end--------------->8---

in which case the caching isn't even used as *no* action is taken on the
source-code block during export

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

Yes, these points are both very valid.  Exporting should not change the
buffer being exported, however, that leaves caching no way to save it's
results aside from the somewhat hackey out-of-file solutions used
elsewhere.  When we were initially working on caching Dan had a solution
which saved cache information in memory which allowed caching on export
without any file/buffer changes but which saved information during the
current Emacs session.  I believe he also worked out a caching system
which stored this same information in a single system-wide file.  If
there is enough interest perhaps it would be worth resurrecting these
ideas.

Thanks -- Eric

  reply	other threads:[~2009-12-23 15:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16  0:07 [PATCH] sha1 hash of latex fragments to avoid regeneration Eric Schulte
2009-11-16  6:57 ` Carsten Dominik
2009-11-17  0:11   ` Eric Schulte
2009-11-17  2:42     ` Eric Schulte
2009-11-17 13:21       ` Carsten Dominik
2009-11-17 15:24         ` Eric Schulte
2009-11-17 15:36           ` Carsten Dominik
2009-11-17 17:02             ` Eric Schulte
     [not found]               ` <m23a4dozic.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-12-02 10:35                 ` Francesco Pizzolante
2009-12-05 16:35                   ` Eric Schulte
     [not found]                     ` <yn43a3pqsyw.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-12-07 12:48                       ` Francesco Pizzolante
2009-12-23 15:17                         ` Eric Schulte [this message]
2009-11-17 13:14     ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87aax9u3cd.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fpz@missioncriticalit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).