> On Apr 30, 2020, at 11:55 AM, akater <nuclearsp...@gmail.com> wrote:
>
[deleted - discussion of html export]
> -----
>
>
> If I may prematurely offer my vision: Common Lisp has special operator
> eval-when which specifies when the enclosed code is to be evaluated (or
> compiled). Example:
>
> (eval-when (:compile-toplevel) (defun f () ..))
>
> specifies that function f should be defined during compilation only.
>
> I believe it would be neat if Org-mode widely supported :eval-when
> header argument inspired by Common Lisp's eval-when. Usage examples
> would be:
>
> #+begin_src emacs-lisp :eval-when compile load
> ..
> #+end_src
>
You can effectively do this by using an elisp expression for the value of an
:eval arg like this:
#+begin_src emacs-lisp :eval (or (bound-and-true-p my-eval-flag) "no")
"done"
#+end_src
which honors the value of `my-eval-flag' if there is one.
You can also use a call to a src block. e.g. `:eval my-src-block(a=1,b=2)'
HTH,
Chuck