From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sunny Srivastava Subject: Re: Help: Getting ESS key binding to work with a R code block in org-mode Date: Sun, 21 Nov 2010 15:50:59 -0500 Message-ID: References: <87y68mctxy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1109628374==" Return-path: Received: from [140.186.70.92] (port=39070 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKGsI-0004DM-KS for emacs-orgmode@gnu.org; Sun, 21 Nov 2010 15:51:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKGsH-0001FK-7Q for emacs-orgmode@gnu.org; Sun, 21 Nov 2010 15:51:02 -0500 Received: from mail-ew0-f41.google.com ([209.85.215.41]:53383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKGsG-0001F9-Uf for emacs-orgmode@gnu.org; Sun, 21 Nov 2010 15:51:01 -0500 Received: by ewy25 with SMTP id 25so3561811ewy.0 for ; Sun, 21 Nov 2010 12:51:00 -0800 (PST) In-Reply-To: <87y68mctxy.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: emacs-orgmode mailing list --===============1109628374== Content-Type: multipart/alternative; boundary=0015174be5b00491040495964ce9 --0015174be5b00491040495964ce9 Content-Type: text/plain; charset=ISO-8859-1 Hello Dan: Thank you. I knew it was something silly like that .. C-c ' is the right key and not C-c ` .. (I didn't notice the difference :-( ) Everything works perfectly normal now. Actually, I have started using Eric's fork of emacs-starter-kit and it has done wonders to my productivity with Emacs. The kit activates R by default (if I understood the documentation correctly). Thanks, S. PS: If you are the same Dan as on worg, thank you for drift.org ... it has helped me a lot in writing my paper. On Sun, Nov 21, 2010 at 3:17 PM, Dan Davison wrote: > Sunny Srivastava writes: > > > Hello Org-moders, > > I have been a very happy ESS user so far. Recently, I was introduced to > > org-mode and I am still a beginner. > > > > I am trying to write a research paper using the literate programming > style > > of org-babel-R, instead of Sweave, and the journey has been OK so far. I > > have a very lame question related to this, so please bear with me. > > > > I am used to the ESS key-bindings, however they don't work properly in > the > > code block (begin_src R ... end_src). I googled and found that it is > > recommended to use C-c ` to edit the source code in an Org-tmp buffer. > > However, there are a few issues related to this: > > Hi Sunny, > > A couple of possibilities to solve your current problems: > > Firstly, the key combination is C-c ' not C-c ` > > i.e., that character is a straight single quote. > > Secondly, have you activated R as an Org-babel language? > > See section 14.7 of the manual. You can do it with customize, or you can > do it by adding some emacs-lisp to your .emacs file. E.g. the following > activates emacs-lisp and R: > > (org-babel-do-load-languages > 'org-babel-load-languages > '((emacs-lisp . t) > (R . t))) > > Don't hesitate to get back to the list if you have further questions. > > Dan > > > > > > 1. Let's say I have a code block which contains some code in it. When I > do > > C-c ` a temporary buffer opens up but it doesn't include the R code that > was > > in the code block. > > 2. The temporary buffer for editing R code doesn't associate itself with > > ESS, ie the key-bindings don't work. (I am addicted to the "smart _" key > > binding of ESS as well I am facing problems indenting the code using > C-M-\) > > > > Any help or pointers is much appreciated. > > > > Thanks to Eric and other developers for implementing such a great idea. > > > > > > Version: 7.3 (release_7.3-89-g97f4c > > _______________________________________________ > > Emacs-orgmode mailing list > > Please use `Reply All' to send replies to the list. > > Emacs-orgmode@gnu.org > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --0015174be5b00491040495964ce9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Dan:
Thank you. I knew it was something silly like that ..=A0

C-c ' is the right key and not C-c ` .. (I didn&#= 39;t notice the difference :-( )

Everything works = perfectly normal now.

Actually, I have started using Eric's fork of emacs= -starter-kit and it has done wonders to my productivity with Emacs. The kit= activates R by default (if I understood the documentation correctly).

Thanks,
S.

PS: If yo= u are the same Dan as on worg, thank you for d= rift.org ... it has helped me a lot in writing my paper.

On Sun, Nov 21, 2010 at 3:17 PM, Dan Davison <dandavison7@gmail.com> wrot= e:
Sunny Srivastava <research.baba@gmail.com> writes:

> Hello Org-moders,
> I have been a very happy ESS user so far. Recently, I was introduced t= o
> org-mode and I am still a beginner.
>
> I am trying to write a research paper using the literate programming s= tyle
> of org-babel-R, instead of Sweave, and the journey has been OK so far.= I
> have a very lame question related to this, so please bear with me.
>
> I am used to the ESS key-bindings, however they don't work properl= y in the
> code block (begin_src R ... end_src). I googled and found that it is > recommended to use C-c ` to edit the source code in an Org-tmp buffer.=
> However, there are a few issues related to this:

Hi Sunny,

A couple of possibilities to solve your current problems:

Firstly, the key combination is C-c ' =A0not =A0 C-c `

i.e., that character is a straight single quote.

Secondly, have you activated R as an Org-babel language?

See section 14.7 of the manual. You can do it with customize, or you can do it by adding some emacs-lisp to your .emacs file. E.g. the following
activates emacs-lisp and R:

(org-babel-do-load-languages
=A0 =A0 =A0'org-babel-load-languages
=A0 =A0 =A0'((emacs-lisp . t)
=A0 =A0 =A0 =A0(R . t)))

Don't hesitate to get back to the list if you have further questions.
Dan


>
> 1. Let's say I have a code block which contains some code in it. W= hen I do
> C-c ` a temporary buffer opens up but it doesn't include the R cod= e that was
> in the code block.
> 2. The temporary buffer for editing R code doesn't associate itsel= f with
> ESS, ie the key-bindings don't work. (I am addicted to the "s= mart _" key
> =A0binding of ESS as well I am facing problems indenting the code usin= g C-M-\)
>
> Any help or pointers is much appreciated.
>
> Thanks to Eric and other developers for implementing such a great idea= .
>
>
> Version: 7.3 (release_7.3-89-g97f4c
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--0015174be5b00491040495964ce9-- --===============1109628374== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1109628374==--