|Subject:||Re: [O] [PATCH] org-babel-execute-src-block-region|
|Date:||Wed, 11 Nov 2015 20:55:57 +0200|
On Wed, 11 Nov 2015, Ista Zahn wrote:
I recommend using polymode as a more general solution to the need to
interact with code blocks without pulling up a separate edit buffer. It
seamlessly switches major modes when point is inside a code block.
Thanks for this pointer. I've been meaning to check out polymode for
some time, and your posting gave me the push to try it out.
For anyone who wants to try it, after cloning into ~/elisp/polymode I
only needed to add this in my init (ESS was already in my init).
(append '("~/elisp/polymode" "~/elisp/polymode/modes")
(add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
When point is inside a src-block the local mode prevails. So, C-c C-n
inside an R src block sends the line point is on to the R process. C-c
C-c sends the region (or function or paragraph) to the process when
point is in the body. To execute `org-ctrl-c-ctrl-c' on the src block
with the C-c C-c keying, it is necessary to move point to before or
after the body.
Now that I have tried this, I agree that it is better to let polymode
handle this kind of interaction than to try to build it into Org mode.
|[Prev in Thread]||Current Thread||[Next in Thread]|