emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Xebar Saram <zeltakc@gmail.com>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: Carlos Henrique Machado S Esteves <ch.machado.esteves@gmail.com>,
	emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>,
	Ista Zahn <istazahn@gmail.com>
Subject: Re: [PATCH] org-babel-execute-src-block-region
Date: Wed, 11 Nov 2015 20:55:57 +0200	[thread overview]
Message-ID: <CAOQHXPoEwNVs=PF7c0_YynTS7B-c_dqcqF87W-L+A6N8db9sOg@mail.gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.20.1511110909340.517@charles-berrys-macbook.local>

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

thanks Chuck

this sounds very interesting!

i installed polymode from melpa and added this config

#+BEGIN_SRC emacs-lisp :results none
(use-package polymode
 :ensure t
 :config
(require 'poly-R)
(require 'poly-org)
(add-to-list 'auto-mode-alist '("\\.org" . poly-org-mode))
 )
#+END_SRC

i then loaded a .org file with R code and entered C-c C-n in the R code
block yet nothing happens and the point moves to the end of the block

are there additional config needed (keybinds, etc?), what am i missing?

best

z

On Wed, Nov 11, 2015 at 7:43 PM, Charles C. Berry <ccberry@ucsd.edu> wrote:

> 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
>
>

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

  reply	other threads:[~2015-11-11 18:56 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
2015-11-11 18:55           ` Xebar Saram [this message]
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

  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='CAOQHXPoEwNVs=PF7c0_YynTS7B-c_dqcqF87W-L+A6N8db9sOg@mail.gmail.com' \
    --to=zeltakc@gmail.com \
    --cc=ccberry@ucsd.edu \
    --cc=ch.machado.esteves@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=istazahn@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).