emacs-ess / ESS

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

Automatic sourcing of lines when scrolling in .Rnw file #28

Closed vzemlys closed 11 years ago

vzemlys commented 11 years ago

In a .Rnw file when moving from tex code to R chunk code, the line is immediately sent to R process. If I move the cursor from top to bottom the line <<>> is getting evaluated, if I move from bottom to top, then the last line of the chunk before @ is evaluated. This makes editing Sweave files quite annoying. I use ESS 12.09 with Aquamacs 2.2 on Mac OS X 10.6.8.

vzemlys commented 11 years ago

My bad, had

(add-hook 'ess-mode-hook      
      (define-key ess-mode-map (kbd "<A-return>") 'ess-eval-region-or-line-and-step)    

)

Instead of

(add-hook 'ess-mode-hook
    '(lambda nil      
      (define-key ess-mode-map (kbd "<A-return>") 'ess-eval-region-or-line-and-step)    
      )
)

in my .emacs.