emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.online>
To: emacs-orgmode@gnu.org
Subject: Re: execute src block during export (Re: Worg HTML export problem?)
Date: Thu, 11 Nov 2021 07:24:04 -1000	[thread overview]
Message-ID: <87lf1uk3m3.fsf@tsdye.online> (raw)
In-Reply-To: <smj454$jij$1@ciao.gmane.io>

Aloha Max,

Max Nikulin <manikulin@gmail.com> writes:

> On 11/11/2021 04:24, Thomas S. Dye wrote:
>> Max Nikulin writes:
>>> On 08/11/2021 05:46, Thomas S. Dye wrote:
>>>> to fail, but AFAICT ob-doc-org.org doesn't have this 
>>>> affliction--it exports
>>>> locally.
>
> Have you tried to export it from "emacs -Q -L 
> /path/to/org-mode/lisp"?
> I think, you just have "org" in customized 
> "org-babel-load-languages".
>
>>>> I've likely made some other error, but I don't have clue what 
>>>> it might be.
>>>> I don't know how to debug this.  Can someone help, please?
>>>
>>> https://builds.sr.ht/~bzg/job/623225
>>>
>>> [exporting] org-contrib/babel/languages/ob-doc-org.org
>>> No org-babel-execute function for org!
>>>
>>> However I do not see explicit load/require for particular 
>>> language in sibling
>>> files. I expected something like
>>>
>>> #+begin_src emacs-lisp :exports none
>>>   (require 'ob-org)
>>> #+end_src
>> Thanks for looking into this.
>> Is the problem something I can fix in ob-doc-org.org?  Or, does 
>> it have 
>> to do with the configuration at sr.ht?
>
> All settings are in .build.yaml and publish.sh (lisp) file.
>
> Sorry, I have missed the following code in your file
>
> #+begin_src emacs-lisp
>   (org-babel-do-load-languages
>    'org-babel-load-languages
>    '((org . t)))
> #+end_src
>
> I am unsure whether it should work in this form or it worked 
> earlier, but on
> main branch it is not executed during export. If I change first 
> line to the
> following, the block is executed during export:
>
> #+begin_src emacs-lisp :results value none :exports results
>
> My minimal example:
>
> Test
>
> #+begin_src emacs-lisp :results value none :exports results
>    (org-babel-do-load-languages
>     'org-babel-load-languages
>     '((org . t)))
> #+end_src
>
> #+name: org-hello
> #+begin_src org :var hello="World"
>   Hello, $hello!
> #+end_src
>
> #+begin_src elisp :var x=org-hello[](hello="Org") :exports both
>   (print x)
> #+end_src

Thanks!

The original problem is likely due to the default header arguments 
in ob-org.el, which are unusual.

If I export both, then all is well.

#+begin_src emacs-lisp :results value none :exports both
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((org . t)))
#+end_src

All the best,
Tom
-- 
Thomas S. Dye
https://tsdye.online/tsdye


  reply	other threads:[~2021-11-11 17:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 22:46 Worg HTML export problem? Thomas S. Dye
2021-11-10 16:50 ` Max Nikulin
2021-11-10 21:24   ` Thomas S. Dye
2021-11-11 13:00     ` execute src block during export (Re: Worg HTML export problem?) Max Nikulin
2021-11-11 17:24       ` Thomas S. Dye [this message]
2021-11-12 14:26         ` Max Nikulin
2021-11-12 16:55           ` Thomas S. Dye
2021-11-13 12:17             ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf1uk3m3.fsf@tsdye.online \
    --to=tsd@tsdye.online \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).