all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: org-sbe and code blocks in a different files
@ 2020-07-08 20:29 Douglas Perrin
  2020-07-09  7:09 ` Michael Welle
  0 siblings, 1 reply; 9+ messages in thread
From: Douglas Perrin @ 2020-07-08 20:29 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: mwe012008

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

Hi Michael,
Maybe I am not understanding what you want to do but I use
org-babel-lob-ingest/org-sbe to execute blocks from other files on
start-up like this:
# Local Variables:
# eval: (org-babel-lob-ingest "Template-Loader.org")
# eval: (org-sbe "Init-Template") ;; the name of a block
in Template-Loader.org file
# End:

I assume this means that org-sbe can see the block names from the other
file. But I haven't tested the behavior with #call just executing elisp.
Doug



Date: Wed, 08 Jul 2020 16:59:32 +0200
From: Michael Welle <mwe012008@gmx.net>
To: emacs-orgmode@gnu.org
Subject: Re: org-sbe and code blocks in a different files
Message-ID: <877dve9hnv.fsf@luisa.c0t0d0s0.de>
Content-Type: text/plain

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> * org-babel-lob-ingest
ah, I learned something new here. Unfortunately, it seems like org-sbe
doesn't look into the list spit out by org-babel-lob-ingest.

Regards
hmw

[-- Attachment #2: Type: text/html, Size: 1566 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread
* org-sbe and code blocks in a different files
@ 2020-07-07 18:43 Michael Welle
  2020-07-08 14:10 ` Eric S Fraga
  2020-07-08 14:11 ` Eric S Fraga
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Welle @ 2020-07-07 18:43 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I can execute code blocks in different (separate?) files like this:

#+call: ../lob.org:convert-time-range-to-days(range="<2020-02-19
 Wed>--<2020-02-21 Fri>")

That is great. Can I call the same function from a table function?
org-sbe doesn't support the above notation extended with an Org file
name, I think.


Second, I try to concentrate useful reusable code blocks in one file,
lob.org in my case. That works. But I feel that I need some of the elisp
based code blocks as code blocks, that I can execute, as well as
separate elisp forms that I can eval from elisp code. How to deal
with that?

Ideas:

Having two code blocks per function: one with the actual elisp code that
can be tangled and a second one that just evals the form and can be used
as a, well, code block usable with #+call?

Or should I give them names like func and func_code (that's the one with
actual elisp code) and write an elisp form that grabs all code blocks
named *_code and evals them at start-up to bring the forms into the
environment?

Other ideas are also welcome.

Regards
hmw


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

end of thread, other threads:[~2020-07-09 17:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08 20:29 org-sbe and code blocks in a different files Douglas Perrin
2020-07-09  7:09 ` Michael Welle
2020-07-09 16:43   ` Berry, Charles via General discussions about Org-mode.
2020-07-09 17:17     ` Michael Welle
  -- strict thread matches above, loose matches on Subject: below --
2020-07-07 18:43 Michael Welle
2020-07-08 14:10 ` Eric S Fraga
2020-07-08 14:11 ` Eric S Fraga
2020-07-08 14:59   ` Michael Welle
2020-07-08 15:07     ` Eric S Fraga

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.