[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#31605: closed (25.3; tramp-terminal-type too obscu

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#31605: closed (25.3; tramp-terminal-type too obscure)
Date: Wed, 30 May 2018 07:04:01 +0000

Your message dated Wed, 30 May 2018 09:02:52 +0200
with message-id <address@hidden>
and subject line Re: bug#31605: 25.3; tramp-terminal-type too obscure
has caused the debbugs.gnu.org bug report #31605,
regarding 25.3; tramp-terminal-type too obscure
to be marked as done.

(If you believe you have received this mail in error, please contact

31605: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31605
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.3; tramp-terminal-type too obscure Date: Sat, 26 May 2018 18:14:49 -0400
This is mostly a documentation issue for tramp's info file.  The
problem is that `tramp-terminal-type` is described almost as an
afterthought in a section that talks about `tset` of all things...

It would be good to describe it better, and also mention it in the
section about zsh, since it's probably a very common problem there
with sophisticated prompts.


The thing is that the usual recommendation (included in the info too)

    [ $TERM = "dumb" ] && unsetopt zle && PS1='$ '

For *years* I have not used tramp because I couldn't find a way to
make things work.  I ran into the zsh problem and coudln't find a
simple way that makes things just work: the above suffers from
affecting *all* dumb terminals, including running a shell inside of
Emacs too -- and while I don't use a right-prompt in Emacs, I don't
want to give up my useful prompt in the environment I most frequently
run my shells in!  It finally dawned on me that instead of doing the
above, I can hack tramp: find whatever function runs the command and
advice it somehow to see a different TERM setting -- but as I was
looking into doing that, I was surprised to find that
`tramp-terminal-type` already exists!  Using it, a much better
solution is to (setq tramp-terminal-type "tramp"), and in my .zshrc:

    [[ $TERM == "tramp" ]] && unsetopt zle && PS1='$ ' && return

(Side note: since it's in zsh, it's better to use [[...]], and also
the wiki suggestion adding a `return` is useful since `.zshrc` is
intended for interactive configuration.)

In fact, I'd argue that the *default* value is better set as "tramp".
"dumb" is very overuse to provide some kind of interactivity that
tramp doesn't need anyway, so having a terminfo-unknown name like
"tramp" could only improve things for tramp uses.  But that will
likely break too many existing configurations (like ones that do the
above recommended zsh hack...), so maybe recommend it instead.

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

--- End Message ---
--- Begin Message --- Subject: Re: bug#31605: 25.3; tramp-terminal-type too obscure Date: Wed, 30 May 2018 09:02:52 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Version: 26.2

Eli Barzilay <address@hidden> writes:

Hi Eli,

> Thanks!  Minor tweak:
>      If you want to use another value for ‘TERM’, change
>      ‘tramp-terminal-type’ and this line accordingly.
>                            ^^^^^^^^^^^^^

Thanks, I've updated it. Closing the bug.

Best regards, Michael.

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]