0

Prompt can be deleted when I do a run-scheme but not in run-python. Is there a way to make it standard i.e not to delete the prompts? I checked the comint-mode manual but couldn't find anything that controlled this behavior.

Are there any advantages using comint over ansi-term? I am thinking if I should stick with ansi-term because the default behaviour is better. Only problem I have is to sync with my source code in a correct way (other than hacks like copy paste the clipboard etc)

1
  1. I can't reproduce this in emacs -Q, the prompts can be deleted for both Scheme and Python buffers. Customizing comint-prompt-read-only gives me a read-only prompt for both again.

  2. ansi-term is much slower as it emulates a full terminal, should behave correctly and is less Emacs-like (captures more keys, harder to customize). comint-derived modes on the other hand are more light-weight, have their basic behaviour in common and can be customized to have extra features you need.

  • It is like you said in Emacs 24.5. I am using 25.0.5 compiled on my machine. Oddly its just the prompt ">>>" that is readonly in the case of python and "=>" in the case of ipython. Its also colored differently. Other texts are free and deletable. >>> appears three times in 24.5 on the same line and is deletable. Wonder if we can restrict parts of text like that? And apparently something has changed in 25.0.0? – Nishant Jul 22 '15 at 9:04
  • 1
    See emacs.stackexchange.com/a/2897/10 for turning it all read-only. The stray prompts are Emacs sending extra commands to subprocesses and getting it back, but there's no proper way around that. – wasamasa Jul 22 '15 at 10:20
  • Thanks - those stray prompts doesn't appear in 25.0.5.50 but as exlpained you can see it behaves differently with Python and Scheme for not-so-clear reasons. – Nishant Jul 22 '15 at 10:29
  • 1
    Feel free to report this unusual behaviour with M-x report-emacs-bug if it's not gone after rebuilding the latest git checkout. – wasamasa Jul 22 '15 at 11:43
  • Ok I will build with the latest git and see if the issue goes away or else submit a bug report. – Nishant Jul 22 '15 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.