Code Monkey home page Code Monkey logo

Comments (5)

vspinu avatar vspinu commented on September 26, 2024

Thanks for the note. We discussed this once, some 2 years ago. May be we should
revisit it once again.

Currently C-c C-c and M-C-x do detect function like blocks and I personally have
a feeling that this is quite enough, as it is often desirable to execute blocks
of code inside a block. This is especially true during the debugging.

Moreover, what would you do with nested blocks? Which one to execute, top-level?
If C-c C-c would start executing an entire top-level blocks, I am sure many
people will find it inconvenient.

A non controversial solution would be to add a new evaluation function
ess-eval-block and bind it to a key. I think this could be quite easily done.

On the other hand, top level blocks are clearly defined in any language. And
then any ess dialect would benefit from automatic block evaluation. So this
functionality might be good to hook on C-c C-c.

Let's see what others from @ess-core think.

from ess.

torbjorn avatar torbjorn commented on September 26, 2024

Thanks! The way I see it, this functionality would add valuable functionality as it stands.
If or where to bind-key it, is a different story, could leave it without a binding and just present it in the menu for starters.

I would say evaluate the block on the level where you stand. If you are on the top level, then its just another way to evaluate the buffer or equivalent.

Nested blocks are just code like any other code inside your current block and should be evaluated as such.
Otherwise - it would be awesome to be able to step into sub-blocks, but that's a completely different story. (I asked about that recently but can't seem to find how to dig up resolved/closed historical issues)

from ess.

DarwinAwardWinner avatar DarwinAwardWinner commented on September 26, 2024

You might want to check out expand-region, which would let you easily mark the block in question, after which you could use ess-eval-region. This would also work with nested blocks.

from ess.

torbjorn avatar torbjorn commented on September 26, 2024

I will indeed, thanks

On Tue, Jul 15, 2014 at 8:42 PM, Ryan Thompson [email protected]
wrote:

You might want to check out expand-region
https://github.com/magnars/expand-region.el, which would let you easily
mark the block in question, after which you could use ess-eval-region.
This would also work with nested blocks.


Reply to this email directly or view it on GitHub
#51 (comment).

mvh
Torbjørn Lindahl

from ess.

jabranham avatar jabranham commented on September 26, 2024

This has been open 6 years and people seem lukewarm about it, so I'm closing this issue. If people still want it, feel free to reopen.

from ess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.