The only difference is that we were forcing comint-use-prompt-regexp to be t, but sending code to Macaulay2 works just fine whether it's t or nil. The value determines whether we send just a single line or the entire input field to the M2 process when scrolling up to previous inputs and pressing Return. Let's let the user choose the desired behavior by setting comint-use-prompt-regexp to t if they choose. (It defaults to nil globally).
Here's an example. Suppose we enter the following (using C-j for the newlines), and then call comint-send-input:
i1 : 1
2
3
o1 = 1
i2 :
o2 = 2
i3 :
o3 = 3
Now suppose we scroll up to the very first line with comint-use-regexp set to nil and call comint-send-input. We get all three lines:
i4 : 1
2
3
o4 = 1
i5 :
o5 = 2
i6 :
o6 = 3
Now suppose we do it again, but after setting comint-use-regexp to t. We just get the first line:
The only difference is that we were forcing
comint-use-prompt-regexp
to bet
, but sending code to Macaulay2 works just fine whether it'st
ornil
. The value determines whether we send just a single line or the entire input field to the M2 process when scrolling up to previous inputs and pressing Return. Let's let the user choose the desired behavior by settingcomint-use-prompt-regexp
tot
if they choose. (It defaults tonil
globally).Here's an example. Suppose we enter the following (using C-j for the newlines), and then call
comint-send-input
:Now suppose we scroll up to the very first line with
comint-use-regexp
set tonil
and callcomint-send-input
. We get all three lines:Now suppose we do it again, but after setting
comint-use-regexp
tot
. We just get the first line:Here's the commit where it was originally set to
t
: https://github.com/Macaulay2/M2-emacs/commit/6449756793c575f2e26f3cb43e21663f4e969b8e What was the problem this was trying to solve?