Dear Vitalie,
many thanks for an extremely useful package!
There is only one smallish annoyance when editing in R-chunks in Rnw files (poly+noweb+r-mode) with ess-R-smart-operators set to t.
Suppose you are at the position indicated by | in the below R-chunk:
\documentclass{article}
\usepackage{Sweave}
\begin{document}
vjghh flflh.
<<>>==
a <- c(1|
@
bla.
\end{document}
Then, inserting a "," re-indents the surrounding expression. This is, of course, how it should be (and it works as it should in ess-r-mode). But in the R chunk it leads to an indention like this:
<<>>==
a <- c(1, |
@
You can reproduce the behaviour by calling "emacs -Q -l miniinit.el test.Rnw" with the following minimal init file:
;; -- Mode: Emacs-Lisp --
(let ((default-directory "/usr/share/emacs/site-lisp/"))
(normal-top-level-add-subdirs-to-load-path))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Auc-TeX
(load "auctex.el" nil t t)
(load "auctex-autoloads")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ESS
(load "ess-site")
(setq-default ess-R-smart-operators t
ess-swv-plug-into-AUCTeX-p t
ess-swv-pdflatex-commands "pdflatex")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Polymode
(load "polymode-autoloads")
(load "poly-R")
(add-to-list 'auto-mode-alist '(".Rnw" . poly-noweb+r-mode))
This must have to do with the indent-line-function called. But I am unable to spot the location where this happens.
Thank you very much,
Uli Poetter
P.S.: This is with emacs 24.3 and all packages last updated from (m)elpa just yesterday.