This set of functions configures Emacs to have my preferred window setup for working with R or python code. Specifically it implements a window setup as follows:
|---------------|
| R code buffer |
| |
| |
| |
| |
| |
|---------------|
| RE-Builder |
|---------------|
| R process |
| |
|---------------|
There is one function in the code, ‘rwin-resize’. Calling it with no prefix argument implements a window configuration where R is in the bottom window. With a prefix argument, calling the function puts the inferior Python process in the bottom window. I bind the function to a key-chord, “jq”.
I use the main window for editing code and sending it to the inferior R or Python process.
RE-Builder is a useful tool in Emacs for building regular expressions.
Devoting a window to the inferior R process is a good way to view the output of code sent to it.
Note that the R/Python window is setup as a ‘side-window’ and thus cannot be split and is dedicated to the inferior R process buffer.