Skip to content

Evaluate nearest expression, a bit like lisp's C-x C-e #52

@torbjorn

Description

@torbjorn

Hi, in lisp I can go to the end of a bracket (foo bar)<-here and hit C-x C-e and it will evaluate the list that ends with that bracket

Could something similar be implemented for R?

Im thinking along these lines:

foo <- sum( is.na( some.funcion() ) ) )

If I place the marker after a bracket, it would evaluate the nested code matching that level, ie (showing the marker with underscore):

foo <- sum( is.na( some.function()_ ) ) # would evaluate some.function()

foo <- sum (is.na( some.fun_ction() ) ) # would also evluate some.function()

foo <- sum( is.na( some.function() ) )_ # would evaluate sum( ... )

foo <-_ sum( is.na(some.function() ) ) # would evaluate the assignment (and the sum )

That way I could easily debug nested code on one code line (or paragraph) without having to re-select incremently larger potions of it before running ess-eval-region

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions