emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Ken Mankoff <mankoff@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Babel eval w/ C-c C-c but not (org-babel-execute-buffer)
Date: Wed, 2 Oct 2019 17:59:48 -0400	[thread overview]
Message-ID: <CAJ51ETpzHOTsE9vN+tSuHr8yWphDDosCuH_TqXevKUSsEjwMuA@mail.gmail.com> (raw)
In-Reply-To: <87o8yyj2oe.fsf@gmail.com>

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

I guess this is not easily possible without some advice. When you run
org-babel-execute-buffer the cursor moves into each block, so you need to
save the point before you run it, and then test if point has moved when
org-babel-execute-src-block is called.

It might be easier to write your own version of org-babel-execute-buffer
for this. You could use org-babel-map-src-blocks as the base, and in each
block run a test that determines if it should be executed.

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Wed, Oct 2, 2019 at 4:48 PM Ken Mankoff <mankoff@gmail.com> wrote:

> Hello,
>
> I'm interested in having code blocks that do not eval when I run
> (org-babel-execute-buffer) but do when the cursor is within them and I
> explicitly want to execute them by entering C-c C-c.
>
> I cannot get this behavior playing around with the :eval header argument.
> Is the behavior I described possible?
>
> Thanks,
>
>   -k.
>
>

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

  reply	other threads:[~2019-10-02 21:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 20:46 Babel eval w/ C-c C-c but not (org-babel-execute-buffer) Ken Mankoff
2019-10-02 21:59 ` John Kitchin [this message]
2019-10-10  6:04   ` Ken Mankoff
2019-10-10 16:22     ` Berry, Charles
2019-10-10 16:43       ` Ken Mankoff
2019-10-10 17:21         ` Berry, Charles
2019-10-10 19:01           ` Berry, Charles
2019-10-10 22:13     ` Tim Cross
2019-10-11  4:25       ` Ken Mankoff

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=CAJ51ETpzHOTsE9vN+tSuHr8yWphDDosCuH_TqXevKUSsEjwMuA@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@gmail.com \
    /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).