Conversation
|
Is there any chance of supporting multiple sessions per Emacs process with |
|
I have to vote no on this one as well -- it removes functionality that currently works well. |
|
Looks like multiple sessions are important, so we will bring it back. Note that there are people out there that think in opposite way: they think that managing multiple sessions is confusing and brings nothing to the table because the usual GHCi process is anyway about 4GB of resident RAM occupancy. |
|
@vasanthaganeshk: Can you cut this somehow into even smaller parts? I mean something like this process:
Related: #1527 |
|
Emacs runs on a single thread. If you are doing some task (opening a big file, starting some process, etc.), Emacs is going to get stuck for a while. In the meanwhile you might want to edit something in the other session, the only problem is that Emacs won't respond to C-x b or anything for that matter. Emacs was not designed to handle concurrent things. I think running two Emacs process will be the solution if you want to work on things simultaneously. Running multiple Emacs process is not taxing on a modern computer. I think doing things without leaving Emacs is a little overrated. I don't think multiple sessions is the correct solution to work on two different projects simultaneously. |
|
@vasanthaganeshk, the 'freeze' takes only time during fork and exec, everything else is nicely parallel as internally Emacs uses the usual pipes mechanism. I do not think running more then one Emacs is a viable solution: most GUIs out there (Windows, Mac OSX, Linux on desktop) make it rather hard to run more than one of an application at the same time. Even though I agree in principle that having more than one session is questionable, there are clearly people out there that like this features. It would be a shame to take away their toy and we aren't going to upset them with this. And, on top of that, it looks like this discussion is a great motivator to actually fix session management. |
|
Multiple everything is the expected behavior in emacs, IMO. I often work on multiple constituent subprojects (for example: explore a bug in some downstream project and then try out fixes or potential regression tests in an upstream library) as well as on unrelated projects (work and hobby, for example). |
|
Big +1 from me on using I agree that there should be no assumption of only one session per Emacs instance, but that doesn't need to be complicated to achieve: At the very least, I should be able to set a variable like 'inf-haskell-buffer-name` on a directory-local basis, and then as long as everything uses that name to find the repl associated with the current haskell file, everything should Just Work™. Anything else on top of that (e.g. functions that automatically create a suitable repl buffer name based) is optional gravy, IMO, and perhaps even undesirable: some people want a single Emacs-wide REPL, while others would like a separate REPL per cabal target (or group of targets). |
|
@vasanthaganeshk I really like this PR. Are you still active in Haskell? I'd be interested in trying this out and improving it, maybe under some beta name like Is there a TODO list of features that would be lost by using this? I'd be happy using a feature reduced version and if we want it merged into |
|
Is this still alive? |
No, this is long since in conflict with For the sake of |
I can't put in words how much I agree. Maybe then we can leverage gud as well |
|
I followed this PR in helping to cut haskell-mode and it worked out quite well. It was a great PR and thanks to the OA. See https://github.com/tonyday567/haskell-mode/tree/removals I'm going to shove this branch into doom, try it out for a few weeks and see how it runs. |
|
In case you want some extra inspiration troubleshooting or extending this I have switched to my own roll of ghci in comint. It is heavily inspired by the one in python mode |
|
Ok, so that's haskell-repl done! |
|
Exciting to see you pick this up, @tonyday567. Happy to help land it here in due course. |
|
@tonyday567 any news on this? |
|
@rntz Hi Michael, I spent a bit of time teasing apart the comint usage, but I couldn't get a handle on the complexity. In my opinion, it would be a lot of work with uncertain outcome, and little hope of acceptance at the end. I subsequently switched to https://gitlab.com/magus/haskell-ng-mode and found it had everything I needed. |
Breaking Changes (removed defcustoms)
Motivation for removal of
haskell-interactive-mode:haskell-interactive-modetries to do what can readily be done with Comint.C-<up>), Reverse search history (M-r), and the list goes on.What is in this PR?
New architecture.
inf-haskellreplaceshaskell-interactive-modefor querying the REPL process.previously
haskell-doc.el,haskell-completions.el,ghci-script-mode.elandhaskell.elused to depend onhaskell-interactive-modeto talk with the ghci process. Now we use comint for the same thing frominf-haskell.Removed
haskell-interactive-mode(The REPL)interactive-haskell-mode(The minor mode for interactive editing, such as completion at point, show documentation, jump to function definition etc) stays but works withinf-haskellinstead ofhaskell-interactive-mode.Needs DocsAdded docs for
haskell-doc.elandhaskell.elAKAinteractive-haskell-mode