Code Monkey home page Code Monkey logo

Comments (11)

kaz-yos avatar kaz-yos commented on September 17, 2024

Thanks for your suggestion. I should definitely include that option in the next release.

For the time being, a quick fix when that happens is to do (winner-undo) to restore the previous window configuration.

Another hack you could do is to comment out the following line in the code. I haven't tried it myself so there my be unwanted complications.

(delete-other-windows)

from eval-in-repl.

stardiviner avatar stardiviner commented on September 17, 2024

Thanks

from eval-in-repl.

stardiviner avatar stardiviner commented on September 17, 2024

I can add a defcustom variable eir-delete-other-windows. And add code:

(if eir-delete-other-windows
  (delete-other-windows))

Should I add a pull request? Or need to improve this code?

from eval-in-repl.

kaz-yos avatar kaz-yos commented on September 17, 2024

I can do that. Let me try that out with other supported languages, first.

from eval-in-repl.

stardiviner avatar stardiviner commented on September 17, 2024

You're right.

from eval-in-repl.

kaz-yos avatar kaz-yos commented on September 17, 2024

I've created a branch to experiment with this. This kind of works, but at the first invocation of C-RET, now REPL window appears, at the second invocation of C-RET a random window (the window emacs chooses by other-window, I believe) becomes the REPL. Being able to choose which window to turn into a REPL window is ideal. I'll think about how to implement that.

62a48bd

from eval-in-repl.

stardiviner avatar stardiviner commented on September 17, 2024

The function pop-to-buffer might can be used for the REPL buffer. Because it can config the window display rules, and supported by other extensions like popwin: https://github.com/m2ym/popwin-el/

from eval-in-repl.

kaz-yos avatar kaz-yos commented on September 17, 2024

I just updated the package so that the window configuration is minimally disturbed by C-RET.

  • Only 1 window: Splitting occurs. For some languages (IELM, Python, Hy, shell, currently) which side the REPL takes can be configured.
  • 2 windows: The other window becomes the REPL.
  • 3+ windows: For the same languages stated above ace-window interface allows choosing which window to replace with the REPL. For other languages, it up to their major/minor modes' implementation.

from eval-in-repl.

stardiviner avatar stardiviner commented on September 17, 2024
  1. Why the new behavior will use one exist window as position, instead of open a new window?
  2. why by default <C-return> will try to send code to inferior? (this is not a good behavior).

from eval-in-repl.

kaz-yos avatar kaz-yos commented on September 17, 2024
  1. That may be a better behavior in some settings. I'll consider incorporating that.
  2. This is the default behavior of the Emacs Speaks Statistics (ESS) package. The very reason of developing this package was to emulate this behavior. Keeping track of both expressions and evaluation results in the REPL buffer is what I am designing this package to do.

from eval-in-repl.

stardiviner avatar stardiviner commented on September 17, 2024
  1. I see.

from eval-in-repl.

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.