ess

Left justified comments for ESS

烂漫一生 提交于 2019-12-10 21:22:46
问题 When I use C-M-\ (with emacs and ESS) to format my R code, it right justifies my comments. For example, it changes: #This is a comment x=5 to #This is a comment x=5 How do I stop my comments being right-justified? 回答1: One solution is to use ## . By convention, that one doesn't move. 来源: https://stackoverflow.com/questions/3622048/left-justified-comments-for-ess

GNU Emacs 24.1: forcing the TAB key to insert a <tab> character in ESS mode

隐身守侯 提交于 2019-12-10 11:43:22
问题 I almost never use the TAB key for anything except inserting a <tab> ( \t ) character. It is unacceptable to continue typing C-q TAB to do this, because I mostly use tabs for comments. Most of my code indentation is accomplished by Emacs automatically matching my first line of manual indentation, and by binding indent-region to C-TAB . I mostly use the tab key to indent my comments. I prefer to set my tab width to 8 characters and indent each of my comments by two tab characters for a total

ess-rdired: I get this error “no ESS process is associated with this buffer now”

帅比萌擦擦* 提交于 2019-12-10 03:05:31
问题 To use ess-rdired to browse objects, I followed the ESS manual and added the following to my .emacs : (autoload 'ess-rdired "ess-rdired" "View *R* objects in a dired-like buffer." t) When I do M-x ess-rdired , a buffer listing the objects in your current environment appears. However, when I press shortcuts like p , v I get this error: "no ESS process is associated with this buffer now." Besides, can ess-rdired update info of objects when they are changed? 回答1: I had the same problem and sure

Force stop or halt on error

微笑、不失礼 提交于 2019-12-09 04:46:26
问题 I was wondering if anyone knew of a good way to get R or ESS to stop executing the rest of the code beyond the point at which an error occurs if I am evaluating a region or buffer (I've only found the opposite request in the help archives). I was looking in the R help files but option(error=stop) will only stop execution of the offending function or statement but not those that follow it. Thanks! 回答1: If R/ESS is hogging up so much compute time that your emacs/ESS is unresponsive to C-c C-c,

Emacs ESS Mode TAB stops indenting

旧街凉风 提交于 2019-12-07 10:14:12
问题 I'm using Emacs 24 on Windows to write some R code. Up until about 30 minutes ago, whenever I would write a new function, ESS would automatically indent the lines following the function declaration and pressing the tab key on a new blank line would jump me to the appropriately indented starting position inside the declaration. EG: foo <- function() { first line started here second line here. .etc } Now, it is hard wrapping everything to the left, and not responding by automatically indenting

Advanced debugging functionality in R?

北城余情 提交于 2019-12-07 08:46:04
问题 Are there any packages and/or hacks in R that give the debugger more functionality? I'm specifically looking for: The ability to step over a whole loop The ability to step into function calls without calling debug on them also The ability to set breakpoints or effectively insert browser calls into the code while I am already in the debugger (i.e. so that if I figure out during debugging where I want a breakpoint I don't have to quit and rerun the whole function again) Etc. On edit: I run R

How can I switch between R sessions in emacs-ess?

不想你离开。 提交于 2019-12-06 18:09:53
问题 I have two sessions open in Emacs-ESS: one on my desktop and one on a server using tramp. How can I tell ESS which session to use? 回答1: Well I use M-x ess-switch-process all the time to switch between my (local) R sessions inside Emacs. Sections 3.2 has details. Edit As a follow-up to aL3xa's comment, I also have these in a my dot.emacs: (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward-angle-brackets) ; Slightly more debatable (global-set-key (kbd "C-x C-b") 'ibuffer) which

How to access a bash environment variable from within R in emacs-ess

做~自己de王妃 提交于 2019-12-06 01:28:44
问题 In my .bashrc, I have the line: export SETTINGS=/home/user/settings.xml If I load R in bash, I can access this variable using the Sys.getenv function: Sys.getenv("SETTINGS") "/home/user/settings.xml" If I open up R in Emacs (M-x R), SETTINGS is empty: Sys.getenv("SETTINGS") "" What I have tried: adding the following to .emacs, based on How do I make Emacs recognize bash environment variables for compilation? ;; get environment vars from .bashrc (let ((path (shell-command-to-string ". ~/

Emacs ESS Mode TAB stops indenting

巧了我就是萌 提交于 2019-12-05 18:13:22
I'm using Emacs 24 on Windows to write some R code. Up until about 30 minutes ago, whenever I would write a new function, ESS would automatically indent the lines following the function declaration and pressing the tab key on a new blank line would jump me to the appropriately indented starting position inside the declaration. EG: foo <- function() { first line started here second line here. .etc } Now, it is hard wrapping everything to the left, and not responding by automatically indenting after the function declaration or when I hit the tab key. foo <- function() { first line second line }

How to change smart assign key (“_” to “<-”) binding in ESS

*爱你&永不变心* 提交于 2019-12-04 20:15:46
In emacs ESS, how do I correctly change the keybinding for ess-smart-S-assign? What I tried is adding (custom-set-variables '(ess-smart-S-assign-key ":")) to my .emacs , but that made weird things happen: When I press : , just a normal : appears. On the other hand, pressing _ once yields <- as usual, whereas pressing _ a second time then converts this to : . The desired behavior would be to be able to use _ as a normal key, with : being converted to <- . I am using the official emacs 24.3 for windows and the latest development version of ESS (14.06). Here's the docstring for ess-smart-S-assign