emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Babel eval w/ C-c C-c but not (org-babel-execute-buffer)


From: Ken Mankoff
Subject: Re: [O] Babel eval w/ C-c C-c but not (org-babel-execute-buffer)
Date: Thu, 10 Oct 2019 18:43:37 +0200
User-agent: mu4e 0.9.18; emacs 26.3

Hi Charles,

On 2019-10-10 at 18:22 +02, Berry, Charles <address@hidden> wrote...
> If the language mode you use supports of evaluation of the src edit
> buffer (e.g. ESS[R], Python), you can issue
>
> C-c C-v v C-c C-b
>
> for ESS[R] or
>
> C-c C-v v C-c C-c
>
> for Python (I think)
>
> The commands will expand :var args and noweb declarations, then
> execute the corresponding 'send-buffer' command regardless of :eval.

This could work in theory, but doesn't for bash on my system. And (I think) 
with this method tables of output are not then injected back into the Org 
buffer that can be exported as part of the document.

> Why not use something like this
>
> :eval (ok2run)
>
> where `ok2run' consults a property to decide whether to eval the block?

I need to think about this some more... Can you describe more how you picture 
this working? Off the top of my head, I am picturing a top-level property 
setting :eval (ok2run) and then blocks I want to always run have :eval yes and 
blocks I want to run interactively only have a new property, ":eval-on-c-c" set 
to "t". The, (ok2run) checks for eval-on-c-c as a header arg and returns 't' if 
it exists and 'nil' if it does not?


While your suggestions do work for some cases, they feel like work-arounds for 
a missing feature. Isn't the feature I'm proposing a logical enhancement? Why 
would someone C-c C-c (or C-u C-u C-c C-c) on a code block if they didn't want 
it to run? Shouldn't an explicit request override a local header or 
top-level-document flag that says "don't eval"?

  -k.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]