From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Ista Zahn <istazahn@gmail.com>
Cc: Xebar Saram <zeltakc@gmail.com>,
Carlos Henrique Machado S Esteves <ch.machado.esteves@gmail.com>,
emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-babel-execute-src-block-region
Date: Wed, 11 Nov 2015 09:43:34 -0800 [thread overview]
Message-ID: <alpine.OSX.2.20.1511110909340.517@charles-berrys-macbook.local> (raw)
In-Reply-To: <CA+vqiLFgP=tjV3yZgiMvGibjPjgE46MyVgDnHuJbj_SvErGwLw@mail.gmail.com>
On Wed, 11 Nov 2015, Ista Zahn wrote:
> I recommend using polymode[1] 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.
>
> Best,
> Ista
>
> [1] https://github.com/vspinu/polymode
Ista,
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).
#+BEGIN_SRC emacs-lisp
(setq load-path
(append '("~/elisp/polymode" "~/elisp/polymode/modes")
load-path))
(require 'poly-org)
(add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
#+END_SRC
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.
Best,
Chuck
next prev parent reply other threads:[~2015-11-11 17:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 2:17 [PATCH] org-babel-execute-src-block-region Carlos Henrique Machado S Esteves
2015-11-02 18:19 ` Charles C. Berry
2015-11-10 18:19 ` Carlos Henrique Machado S Esteves
2015-11-11 0:08 ` Nicolas Goaziou
2015-11-11 5:10 ` Xebar Saram
2015-11-11 13:44 ` Ista Zahn
2015-11-11 17:43 ` Charles C. Berry [this message]
2015-11-11 18:55 ` Xebar Saram
2015-11-11 21:53 ` Charles C. Berry
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.OSX.2.20.1511110909340.517@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=ch.machado.esteves@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=istazahn@gmail.com \
--cc=zeltakc@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.