emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniele Nicolodi <daniele@grinta.net>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Caching answer to prompt for code block execution
Date: Mon, 9 Nov 2020 17:20:19 +0100	[thread overview]
Message-ID: <3cb1aa1d-29ff-1a81-9ee7-db1843e0a45a@grinta.net> (raw)

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



                 reply	other threads:[~2020-11-09 16:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3cb1aa1d-29ff-1a81-9ee7-db1843e0a45a@grinta.net \
    --to=daniele@grinta.net \
    --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).