Hello,

Thierry Banel <tbanelweb...@free.fr> writes:

>>>     (car pair) ;; variable name
>>> -   (let* ((val (cdr pair)) ;; variable value
>>> -          (lp  (listp val)))
>>> -     (if lp
>>> +   (let ((val (cdr pair))) ;; variable value
>>> +     (if (not (listp val))
>>> +         val
>>> +       (let ((temp-file (org-babel-temp-file "gnuplot-"))
>>> +             (first  (car val)))
>>> +         (setcdr pair temp-file) ;; <------ caching here

[...]

> Your proposal provides an additional benefit: caching file generation
> between several invocations of Babel. (The cache in my patch is intended
> to be used within a single Babel invocation, and is then garbage
> collected.). The drawback is that we need to go through all rows of the
> table, compute the hash, just to discover that the hash was already
> known. The purpose of the cache was precisely to avoid going through the
> table again.

I'm not sure to understand.

I suggest to compute the hash of VAL before it is sent through
`org-babel-gnuplot-table-to-data', i.e., before `orgtbl-to-generic' is
called. There's no "going through the table" involved, is it?

Regards,

-- 
Nicolas Goaziou

Reply via email to