Subject: bug#31605: 25.3; tramp-terminal-type too obscure

From: Eli Barzilay <[email-masked]>
Date: Tue, 29 May 2018 12:39:12 -0400

On Tue, May 29, 2018 at 12:26 PM Michael Albinus <[email-masked]>
wrote:

> >>       Another possibility is to check the environment variable
> >>       ‘INSIDE_EMACS’.  [...]
> >
> > This doesn't help for the common case of ssh.  (In fact, this was
> > what I originally though about using, but configuring ssh/sshd to
> > pass INSIDE_EMACS is a PITA to manage.)  I'm not saying that it
> > shouldn't be mentioned, just that it's not too helpful...

> ??? It is Tramp, which sets this variable in the remote shell
> environment. There's nothing to do for you. Or do I miss something?

I was talking about using it to reconfigure a plain prompt: if tramp
sets the environment variable, it probably does so after it established
a connection, which is blocked with a "misbehaved" zsh prompt...

> > But this is exactly the problem: "dumb" is used in many contexts,
> > including in `M-x shell`.  This means that if I follow what you're
> > recommending, I end up with a crippled `M-x shell` experience since
> > I lose my useful prompt there.  OTOH, I can't imagine that anything
> > that tramp uses would rely on terminfo, which is why I suggested the
> > above.

> The majority of Tramp users does not apply "M-x shell" and
> friends. They are just using Tramp for remote file handling.

I'm not talking about a remote shell, just the general running of a
subshell inside Emacs.  If *that* is not a popular thing to do then I'm
apparently living in a bubble...

Or maybe I'm weird in that I have the same shell configuration synced
across all of the machines I'm using so my remote shell setup is the
same as the local one.

> And Tramp has always problems with whatever esacape seuences are
> around, that I call it an advantage when a dumb TERM simplifies my
> life. Speaking as maintainer.

> It is still possible that you reconfigure everything, and thanks again
> that you have told me that it needs better documentation. But I'm not
> conviced it will be better to change the defaults.

Oh, I *don't* suggest changing the default!  (See the comment in the
original bug: doing that will break existing shell configurations that
detect "dumb".)  I just think that it should be mentioned at least in
the section that talks about the common zsh-hanging problem -- something
like the small addition I did to the wiki page.

-- 
                    ((x=>x(x))(x=>x(x)))                  Eli Barzilay:
                    http://barzilay.org/                  Maze is Life!