unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* `comint-redirect-send-command' causes the shell prompt to be printed twice.
@ 2022-02-14  4:37 Hongyi Zhao
  2022-02-14  5:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-14  5:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 3+ messages in thread
From: Hongyi Zhao @ 2022-02-14  4:37 UTC (permalink / raw)
  To: help-gnu-emacs

On Ubuntu 20.04.3 LTS, I'm using the self-compiled git master Emacs,
and installed comint-mime package 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))
  )
```

But the following code snippet in used in comint-mime package [1]:

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

And the above code will causes the shell prompt to be printed twice
when I issue `M-x shell RET`, as shown here [2]. I filed an issue to
report this problem on this package's GitHub repository [3], but the
developer also don't know how to solve this problem. Here is the
author's description in the above-mentioned issue:

```
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.
```

Therefore, I'm here for help to see if there is any solution.

[1] https://github.com/astoff/comint-mime/blob/1431605940724318c403a6048049c6a32cc16b0e/comint-mime.el#L225-L229
[2] https://user-images.githubusercontent.com/11155854/151753652-5aa63368-dc38-4905-851d-0367984f3c80.png
[3] https://github.com/astoff/comint-mime/issues/12

Regards,
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: `comint-redirect-send-command' causes the shell prompt to be printed twice.
  2022-02-14  4:37 `comint-redirect-send-command' causes the shell prompt to be printed twice Hongyi Zhao
@ 2022-02-14  5:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-02-14  5:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 3+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-14  5:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

> I'm using the self-compiled git master Emacs [...]

What does self-compiled mean here?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: `comint-redirect-send-command' causes the shell prompt to be printed twice.
  2022-02-14  4:37 `comint-redirect-send-command' causes the shell prompt to be printed twice Hongyi Zhao
  2022-02-14  5:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-14  5:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 3+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-14  5:07 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

> On Ubuntu 20.04.3 LTS, I'm using the self-compiled git
> master Emacs

Okay, it means YOU compiled it ...

Right, I do that as well ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-14  5:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-14  4:37 `comint-redirect-send-command' causes the shell prompt to be printed twice Hongyi Zhao
2022-02-14  5:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-14  5:07 ` Emanuel Berg via Users list for the GNU Emacs text editor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).