Closed jave closed 9 years ago
File publishing seems completely random. Look at this:
rm -rf /tmp/oblog 20150320 21:12 /home/joakim/.emacs.d/el-get/o-blog $ ~/emacs/src/emacs --debug-init -Q -batch -L ~/.emacs.d/el-get/o-blog/lisp --eval "(progn (require 'json )(require 'cl-macs ) (require 'o-blog) (require 'o-blog-backend-org))" --eval "(o-blog-publish \"/home/joakim/Plans/oblogtst.org\")"|grep -i copy ob:org:publish-linked-files Copyright 20150320 21:12 /home/joakim/.emacs.d/el-get/o-blog $ ~/emacs/src/emacs --debug-init -Q -batch -L ~/.emacs.d/el-get/o-blog/lisp --eval "(progn (require 'json )(require 'cl-macs ) (require 'o-blog) (require 'o-blog-backend-org))" --eval "(o-blog-publish \"/home/joakim/Plans/oblogtst.org\")"|grep -i copy ob:org:publish-linked-files Copyright 20150320 21:12 /home/joakim/.emacs.d/el-get/o-blog $ ~/emacs/src/emacs --debug-init -Q -batch -L ~/.emacs.d/el-get/o-blog/lisp --eval "(progn (require 'json )(require 'cl-macs ) (require 'o-blog) (require 'o-blog-backend-org))" --eval "(o-blog-publish \"/home/joakim/Plans/oblogtst.org\")"|grep -i copy ob:org:publish-linked-files Copyright 20150320 21:13 /home/joakim/.emacs.d/el-get/o-blog $ ~/emacs/src/emacs --debug-init -Q -batch -L ~/.emacs.d/el-get/o-blog/lisp --eval "(progn (require 'json )(require 'cl-macs ) (require 'o-blog) (require 'o-blog-backend-org))" --eval "(o-blog-publish \"/home/joakim/Plans/oblogtst.org\")"|grep -i copy ob:org:publish-linked-files Copyright Copy file: ("art/accident_observed.svg") COPY art/accident_observed.svg -> /tmp/oblog/accident_observed.svg 20150320 21:13 /home/joakim/.emacs.d/el-get/o-blog $ ~/emacs/src/emacs --debug-init -Q -batch -L ~/.emacs.d/el-get/o-blog/lisp --eval "(progn (require 'json )(require 'cl-macs ) (require 'o-blog) (require 'o-blog-backend-org))" --eval "(o-blog-publish \"/home/joakim/Plans/oblogtst.org\")"|grep -i copy ob:org:publish-linked-files Copyright 20150320 21:13 /home/joakim/.emacs.d/el-get/o-blog $ ~/emacs/src/emacs --debug-init -Q -batch -L ~/.emacs.d/el-get/o-blog/lisp --eval "(progn (require 'json )(require 'cl-macs ) (require 'o-blog) (require 'o-blog-backend-org))" --eval "(o-blog-publish \"/home/joakim/Plans/oblogtst.org\")"|grep -i copy ob:org:publish-linked-files Copyright 201
The funny thing is that the exact same org-publish command is used several times in a row. The fourth time a file is copied, then its not copied any more.
removing the cache in ~/_cache seems to help.
Can the cache be disabled?
this has nothing to do with SVG, rather, its an issue with the cache system. and the issue with the cache is that the implementation doesnt notice when i remove the dest dir. which can be argued is not an error with the cache.
it seems possible to disable the cache by commenting the line in
lisp/o-blog-backend.el
;; (cache-dir "../_cache")
Correction. That does not work reliably. For now, I remove _cache whenever I have to regenerate the blog.
I have two org entries below. They are more or less the same, except in one I try to publish a svg, in the other a jpg. The jpg gets copied properly to the publish dir, the svg doesnt get copied.
I tried to debug for a bit, but got lost. ob:org:publish-linked-files doesnt seem to get called a lot, and I guess the jpg publish isnt really done there.
\ DONE accident_observed.svg :art: :PROPERTIES: :TEMPLATE: art_post.html :END:
CLOSED: [2008-12-17 Wed 21:54]
[[file:art/accident_observed.svg]]
hello
\ DONE maze 0001 :art: :PROPERTIES: :TEMPLATE: art_post.html :END:
CLOSED: [2008-12-17 Wed 21:54]
[[file:art/maze_0001.jpg]]
hello