Emin Martinian <emin.martin...@gmail.com> writes:

> Ihor Radchenko <yanta...@posteo.net> writes:
>
>> Thanks! Any reason you did not just call `org-compile-file' 
>> directly?
>
> I was not familiar with =org-compile-file= and did not understand 
> that you wanted me to call that but instead thought you wanted me 
> to do something similar to the usage of that. Feel free to replace 
> what I provided with =org-compile-file= if you think that is 
> better.

Well. That will amount to rewriting the patch significantly.
The current variant of the patch is not ideal IMHO because it does not
offer the flexibility org-compile-file would provide (like multi-step
export if a user would wish to; and automatic error reporting).

Basically, using org-compile-file will auto-magically bring all the
features of `org-latex-pdf-process' to svg conversion.

>> Did you try looking into org-persist.el commentary?
>> (To be clear, using org-persist would be nice to have, but it is 
>> not
>> something I consider necessary for this patch)
>
> I read the commentary but could not figure out how it is supposed 
> to work. Below is some example code where I create a temporary 
> file and then try to do something with =org-persist-write= and 
> =org-persist-read=. Calling =org-persist-read= does not seem to do 
> anything. I suppose I could not delete the temp file but in that 
> case I don't see what =org-persist= is doing.
> ...

Right. The commentary is indeed confusing.
You should just do

(setq my-temp-file  ;; create a temp file and store the path
       (make-temp-file "bug" nil ".txt" "example data")) ;=> 
"/tmp/bugehW89U.txt"
(org-persist-write `(file ,my-temp-file))
(org-persist-read `(file ,my-temp-file)) 
;=>".../org/persist/de/5467e7-5f9a-4925-bdde-f7d1dff7420f-d343f2e9ee81afdfcd38f1704f5983d8.txt"

I just fixed the example in commentary.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=775c44773

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to