emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
613 stars 160 forks source link

ess-r-mode newline will copy the content again when trying to insert a newline before a sentence #1290

Closed beyondpie closed 2 months ago

beyondpie commented 2 months ago

Hi ESS Group,

Thank you so much for the package! I use it everyday. Today I face a weird trouble:

If I have a code blow:

a <- 1
b <- 1

Then if I enter "Enter" button (newline or ess-roxy-newline if I set ess-roxy-mode as t) when my cursor is right before "b", it will become (this happens not always but with a large probability):

a <- 1
b <- 1
b <- 1

Do you know why this happens? This is happened when I close ess-roxy-mode. And this does not happen in Python-mode.

I use Emacs 30.05 and the latest ESS under macOS. Thanks! Songpeng

beyondpie commented 2 months ago

I think this is related with Emacs version I am using. Under Emacs 29.3, I did not see this problem.