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.
I am sorry for not being able to get org-persist working. I
tried
your suggestions but could not figure out how to do it....
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.
#+BEGIN_SRC emacs-lisp
(setq my-temp-file ;; create a temp file and store the path
(make-temp-file "bug" nil ".txt" "example data"))
(org-persist-write 'file my-temp-file) ;; try to store it with
org-persist
(delete-file my-temp-file) ;; remove the temp file since org is
storing it
(message "result of org-persist-read: %s" ;; try to read the
stored data
(org-persist-read my-temp-file)) ;; (I get back nil)
(file-exists-p my-temp-file) ;; Did org-persist
restore it? (No)
#+END_SRC
Thanks,
-Emin