emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* batch export: org-babel-execute:shell undefined?
@ 2020-12-31 18:07 Greg Minshall
  2021-01-01  4:51 ` Greg Minshall
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Minshall @ 2020-12-31 18:07 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: batch export: org-babel-execute:shell undefined?
  2020-12-31 18:07 batch export: org-babel-execute:shell undefined? Greg Minshall
@ 2021-01-01  4:51 ` Greg Minshall
  2021-01-01  5:32   ` batch export: org-babel-execute:shell undefined? (SOLVED) Greg Minshall
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Minshall @ 2021-01-01  4:51 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: batch export: org-babel-execute:shell undefined? (SOLVED)
  2021-01-01  4:51 ` Greg Minshall
@ 2021-01-01  5:32   ` Greg Minshall
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Minshall @ 2021-01-01  5:32 UTC (permalink / raw)
  To: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-01  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-31 18:07 batch export: org-babel-execute:shell undefined? Greg Minshall
2021-01-01  4:51 ` Greg Minshall
2021-01-01  5:32   ` batch export: org-babel-execute:shell undefined? (SOLVED) Greg Minshall

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).