Closed ldeck closed 2 years ago
sbt-mode
uses comint
for terminal interaction. Comint puts the terminal to read-only when not on a line that has a prompt.
Read about it here: https://www.gnu.org/software/emacs/manual/html_node/emacs/Shell-Prompts.html
So you have some options:
sbt-clear
command to clear the buffer (M-x sbt-clear
). This also clears the read-only status.comint-prompt-regexp
variable to Nil (use M-x set-variable
)MainObject
output a prompt that is compatible with the propt regex (see https://github.com/hvesalai/emacs-sbt-mode/blob/master/sbt-mode-comint.el#L36), such as, for example, >
. However, this might make things funny.Thanks @hvesalai for the hints. sbt-clear
certainly works, though I wonder: is there also a function to merely clear the read-only status without clearing the buffer?
Setting comint-use-prompt-regexp
to nil from t doesn't appear to help, not clearing the regex itself.
If I run sbt via a standard terminal and
runMain my.MainObject
I can provide stdin if prompted. Doing the same in emacs with sbt-start, once running the app as above the buffer is seemingly read-only. How do you provide input?