comint-mime icon indicating copy to clipboard operation
comint-mime copied to clipboard

`Comint-mime` causes the shell prompt to be printed twice.

Open hongyi-zhao opened this issue 3 years ago • 2 comments

On Ubuntu 20.04.3 LTS, I use self-compiled git master Emacs, and installed comint-mime via straight's use-package integration as follows:

(use-package comint-mime
  :straight ( :host github
	      :repo "astoff/comint-mime"
	      :files (:defaults "*.py" "*.sh"))
  ;;https://github.com/jwiegley/use-package#hooks
  ;;https://github.com/astoff/comint-mime#usage
  ;;https://mail.google.com/mail/u/0?ik=7b73d6af10&view=om&permmsgid=msg-a%3Ar-1233702610310931433
  ;;https://mail.google.com/mail/u/0?ik=7b73d6af10&view=om&permmsgid=msg-a%3Ar5550893479419332762
  :hook ((shell-mode inferior-python-mode) . comint-mime-setup)
  :custom
  ;;  https://emacs.stackexchange.com/a/33992
  ;;https://github.com/astoff/comint-mime/issues/4#issuecomment-938384059
  (org-format-latex-options '(plist-put org-format-latex-options :scale 1.5))
  )

When I issue the M-x shell RET command, I found that comint-mime causes the shell prompt to be printed twice as follows:

image

Are there any tips for solving this problem?

Regards, HZ

hongyi-zhao avatar Jan 31 '22 07:01 hongyi-zhao

Yes, this happens intermittently for me as well. It's because of this call:

https://github.com/astoff/comint-mime/blob/1431605940724318c403a6048049c6a32cc16b0e/comint-mime.el#L225-L229

I'm not quite sure what to do about this, since comint-redirect-send-command is not supposed to print any output. In any case, the extra prompt annoying but doesn't do any harm.

astoff avatar Jan 31 '22 11:01 astoff

Why not try to discuss it on help-gnu-emacs?

hongyi-zhao avatar Jan 31 '22 12:01 hongyi-zhao

It would be nice to know why and exactly when this happens, but since it doesn't seems to cause any actual problems, I'll close the issue.

astoff avatar Aug 14 '22 10:08 astoff