Subject: Re: bug#24039: 24.5; emacs shell doesn't work with mosh
From: Michael Albinus <[email-masked]>
To: Nico Schottelius <[email-masked]>
Cc: [email-masked]
Date: Mon, 08 Aug 2016 11:05:45 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Nico Schottelius <[email-masked]> writes:
>
>> Starting M-x shell and afterwards entering "mosh mymachine" results into
>> mosh crashing with:
>>
>> mosh-server: terminalframebuffer.cc:73:
>> Terminal::Framebuffer::Framebuffer(int, int): Assertion `s_height > 0'
>> failed.
>>
>> I suspect that the window height is not being exposed in a standard
>> terminfo way to be consumed by mosh.
>
> Emacs' `shell' sets $TERM to "dumb", which isn't what mosh expects. Try
> "M-x ansi-term", and call "mosh mymachine" from there. This works, at
> least for me.
>
>> Furthermore escapes from bash and zsh are displayed as
>>
>> [J[16:58] wurzel:~% [?2004
>>
>> (where wurzel is my hostname and 16:58 is the time)
>
> Same reason. Teach your .profile or .bashrc or .zshrc not to use escape
> sequences. Use something like this:
>
> if test $TERM = "dumb"
>    # set prompt w/o escape sequences
> else
>    # set default prompt
> end

Since there is no bug in Emacs, I'm closing this. Feel free to reopen if
you believe there's still something open to fix.

Best regards, Michael.