I'm relatively new to emacs and I'm trying my luck with doom emacs (I transitioned from spacemacs), and I've spent hours trying to figure out what's going on.

This is about ESS <RET> behavior. If my cursor is after the X in an R file inside an R package (a roxygen block), and I press enter, ESS should use ess-roxy-newline-and-indent and get me in a new line after a new #', but instead is doing a regular newline-and-indent .

#' X

If I use helpful-key and enter there, it tells me that newline-and-indent, rather than ess-roxy-newline-and-indent. However, if I use describe-key and enter there, it tells me the following:

RET (translated from <return>) runs the command newline-and-indent (found in
ess-roxy-mode-map), which is an interactive compiled Lisp function in

Its keys are remapped to ‘ess-roxy-newline-and-indent’. Without this remapping,
it would be bound to <remap> <newline>.

But it's not doing ess-roxy-newline-and-indent! I can put the cursor after the X, and alt-x ess-roxy-newline-and-indent and get the right output (a new line with #' and the cursor). So I'm not sure what's going on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.