I'm proposing that in M2-comint-mode, F11 and Return should do the same thing (call comint-send-input, pending #53).
And in particular, M2-send-to-program (the F11 function) should only be called from M2-mode. So we can strip out all the code from M2--send-to-program-helper that deals with what to do when it's being called from the same buffer we're inserting commands into. This fixes #19.
We also improve some docstrings, add an error message if the M2 process isn't up and running, and also refactor the buffer/window code a bit.
One thing I thought about dealing with but haven't yet. Suppose we have the following in our M2-comint-mode buffer:
i1 : 1
And suppose we send 2 to this buffer with F11. What should happen? The current behavior:
i1 : 12
o1 = 12
Or, should it behave like some other major modes (like ESS), and save the 1 for later? So:
I'm proposing that in
M2-comint-mode
, F11 and Return should do the same thing (callcomint-send-input
, pending #53).And in particular,
M2-send-to-program
(the F11 function) should only be called fromM2-mode
. So we can strip out all the code fromM2--send-to-program-helper
that deals with what to do when it's being called from the same buffer we're inserting commands into. This fixes #19.We also improve some docstrings, add an error message if the M2 process isn't up and running, and also refactor the buffer/window code a bit.
One thing I thought about dealing with but haven't yet. Suppose we have the following in our
M2-comint-mode
buffer:And suppose we send
2
to this buffer with F11. What should happen? The current behavior:Or, should it behave like some other major modes (like ESS), and save the 1 for later? So: