Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6897863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:13:22+00:00 2026-05-27T07:13:22+00:00

When using R code chunks in an .Rnw document, the emacs buffer automatically detects

  • 0

When using R code chunks in an .Rnw document, the emacs buffer automatically detects that the cursor is within a code chunk (i.e. within <<>> and @), and switches to ESS-mode — this is very valuable because one can get ESS-based code-formatting within the code-chunk, and more-usefully, one can send code lines/regions to the inferior *R* process-buffer.

How do I get the same functionality in an org-mode file within R code blocks (i.e. between #+begin_src R and #+end_src) — I’d like emacs to automatically recognize it’s within an R code code block, and turn on ESS-mode so I can send snippets of code to the *R* process. I am aware that I can do Ctl-C ' and switch to a different ESS-mode buffer where I can edit the code and get all the other ESS-mode conveniences (including sending code to R). However I’d like to not have to do this, i.e. I want to be able to send code-snippets from the R code block in the same org-mode buffer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:13:23+00:00Added an answer on May 27, 2026 at 7:13 am

    A year ago or so, I asked the same question on the org-mode-list. @cm2 has already mentioned, that it is not possible to use ESS functionality within org-mode; as far as I know Emacs cannot handle two major modes and even with mmm-mode there seem to be some difficulties.

    Dan Davison kindly posted some elisp-code which mimics some of the ESS features. So, you might want to check Dan’s replies to my question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In ESS when I am evaluating chunks of code in a .R file using
I've been using CodeRunner to collect little chunks of code that are frequently used
I'm using code that I found on the CodeProject.com for a low-level keyboard hook
I'm using code that takes a bitmap and converts it to 24 BPP so
My main solution is using code from a utility class library, that I wrote
I'm building a web application (using prototype) that requires the addition of large chunks
This is code I'm using to test a webserver on an embedded product that
I'm using the following chunks of code to populate a drop down box on
Here are two chunks of code that accomplish (what I think is) the same
I am using CodeDom to generate C# code, and part of that involves to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.