emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Caching answer to prompt for code block execution
@ 2020-11-09 16:20 Daniele Nicolodi
  0 siblings, 0 replies; only message in thread
From: Daniele Nicolodi @ 2020-11-09 16:20 UTC (permalink / raw)
  To: Org Mode List

Hello,

I am trying to use the org-sbe macro to compute values in an org table.
This results in a (well, actually two, see my other recent email to the
mailing list) prompt for execution of the relevant code block. This is
unpractical when there are more than an handful of cells to be evaluated.

I have a couple of ideas for improvement.

First, I think prompting only once for code blocks evaluated multiple
times by org-sbe would make a lot of sense and would make the user
experience much better.

Second, I think it would be nice to have a way to cache the answer to
the code block execution prompt. This could be implemented caching
somewhere the answer keyed with an hash of the content of the code
block. This should not require many changes to the code. The only thing
that is not obvious is how to expire the cache to do not have it grow
unbound.

What do others think of these approaches?

Cheers,
Dan



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-09 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 16:20 Caching answer to prompt for code block execution Daniele Nicolodi

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).