Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hongyi-zhao opened this issue Jan 31, 2022 · 3 comments
Closed

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

hongyi-zhao opened this issue Jan 31, 2022 · 3 comments

Comments

@hongyi-zhao
Copy link

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

@astoff
Copy link
Owner

astoff commented Jan 31, 2022

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

comint-mime/comint-mime.el

Lines 225 to 229 in 1431605

(comint-redirect-send-command
(format " . %s\n" (shell-quote-argument
(expand-file-name "comint-mime.sh"
comint-mime-setup-script-dir)))
nil nil t)))

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.

@hongyi-zhao
Copy link
Author

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

@astoff
Copy link
Owner

astoff commented Aug 14, 2022

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 astoff closed this as completed Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants