New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
torbjorn opened this Issue Sep 10, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@torbjorn

torbjorn commented Sep 10, 2013

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

@torbjorn

This comment has been minimized.

Show comment
Hide comment
@torbjorn

torbjorn Sep 10, 2013

(in parentheses remarked, that last request should have said "parentheses" where it said "brackets")

torbjorn commented Sep 10, 2013

(in parentheses remarked, that last request should have said "parentheses" where it said "brackets")

@vspinu

This comment has been minimized.

Show comment
Hide comment
@vspinu

vspinu Sep 10, 2013

Member

Thanks, this is indeed a very good suggestion. I am also missing it quite a lot, but never got down to actually implementing it.

Member

vspinu commented Sep 10, 2013

Thanks, this is indeed a very good suggestion. I am also missing it quite a lot, but never got down to actually implementing it.

@torbjorn

This comment has been minimized.

Show comment
Hide comment
@torbjorn

torbjorn Dec 11, 2014

Are there no lisp-heads that could get around to make this dream come true?

torbjorn commented Dec 11, 2014

Are there no lisp-heads that could get around to make this dream come true?

@jabranham

This comment has been minimized.

Show comment
Hide comment
@jabranham

jabranham Aug 31, 2018

Contributor

@lionel- I see you assigned this to yourself a while ago. Have you ever gotten around to looking at how hard this would be to implement?

This came up in the Emacs subreddit recently and I felt bad saying no it's not possible but we have a 5 year old feature request for it :-(

Contributor

jabranham commented Aug 31, 2018

@lionel- I see you assigned this to yourself a while ago. Have you ever gotten around to looking at how hard this would be to implement?

This came up in the Emacs subreddit recently and I felt bad saying no it's not possible but we have a 5 year old feature request for it :-(

@lionel-

This comment has been minimized.

Show comment
Hide comment
@lionel-

lionel- Aug 31, 2018

Member

I'm working on it (and other things requiring the same feature) slowly when I find time. But I was sidetracked with other ESS things recently.

Member

lionel- commented Aug 31, 2018

I'm working on it (and other things requiring the same feature) slowly when I find time. But I was sidetracked with other ESS things recently.

@vspinu

This comment has been minimized.

Show comment
Hide comment
@vspinu

vspinu Sep 1, 2018

Member

C-u M-C-x would also be nice for instrumentationr. I keep pressing it instinctively.

Member

vspinu commented Sep 1, 2018

C-u M-C-x would also be nice for instrumentationr. I keep pressing it instinctively.

@vspinu vspinu added this to the 19.04 milestone Sep 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment