hi. i am doing an export to HTML using "--batch --eval" to invoke emacs. i find that my shell source blocks are *not* being executed unless i use (custom-set-variables), rather than (setq) or (let), to initialize 'org-babel-load-languages. to wit... the following code works: ---- (progn (custom-set-variables '(org-babel-load-languages '((shell . t))) ) (let ((org-confirm-babel-evaluate nil)) (org-html-export-to-html)) (if noninteractive (kill-emacs))) ---- but, with (setq), this does *not* work: ---- (progn (setq org-babel-load-languages '((shell . t)) ) (let ((org-confirm-babel-evaluate nil)) (org-html-export-to-html)) (if noninteractive (kill-emacs))) ---- i find that in the latter case, in (org-babel-exp-results), (org-babel-execute:shell) is not defined. my emacs command line looks like this: ---- emacs -L `find ~/.emacs.d/ -name "org-[0-9]*" -type d` -l org -L `find ~/.emacs.d/ -name "htmlize*" -type d` -l htmlize --batch ./public/index.org --eval " ---- followed by one or the other above code fragments. does this ring any bells? or, any obvious stupidity on my part? cheers, happy 2021, hopefully. Greg
happy 2021, all and sundry.
i should mention something else, in case it makes something click for
someone. obviously, i'm not initializing things right, but that's a
weak part in my knowledge, so i'm not sure what.
> i find that my shell source blocks are *not* being executed unless i
> use (custom-set-variables), rather than (setq) or (let), to initialize
> 'org-babel-load-languages. to wit...
if i run "-Q", i see the same behavior, doing [C-c C-e h h].
*but*, if i first do [C-h f] (describe-function) on
org-html-export-to-html, it works.
so, presumably both (custom-set-variables) and (describe-function) are
doing some sort of initialization.
okay, if any body has any clue, i'd be very curious to know.
cheers, Greg
apologies. (org-babel-do-load-languages) (rtfm!) is what i was lacking. ---- (progn (org-babel-do-load-languages 'org-babel-load-languages '((shell . t)) ) (let ((org-confirm-babel-evaluate nil)) (org-html-export-to-html)) (if noninteractive (kill-emacs))) ---- works. best, Greg