all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "andrés ramírez" <rrandresf@gmail.com>
Cc: Trevor Spiteri <tspiteri@ieee.org>, emacs-devel@gnu.org
Subject: Re: tramp compilation buffer also affected
Date: Sun, 08 Dec 2019 23:33:45 +0200	[thread overview]
Message-ID: <875ziq961a.fsf@mail.linkov.net> (raw)
In-Reply-To: <86v9qv7ht4.fsf@gmail.com> ("andrés ramírez"'s message of "Thu, 05 Dec 2019 00:11:03 +0000")

> BTW: I also did (tramp-cleanup-this-connection, tramp-cleanup-all-buffers)

Actually, tramp-cleanup-... don't update the existing process-environment.
You need restart Emacs after customizing tramp-remote-process-environment.

It's easier to check whether TERM has the right value in Tramp by simply:

  M-x compile RET
  echo $TERM
  RET

For testing compilation highlighting, I just touch xterm.c and compile it,
because compilation of xterm.o always produces warnings:

  M-x compile RET
  touch xterm.c; TERM=ansi make xterm.o
  RET

It produces unhandled escape sequences in the compilation output buffer:

  touch xterm.c; TERM=ansi make xterm.o
    GEN      globals.h
    CC       xterm.o
  ^[[01m^[[Kxterm.c:^[[m^[[K In function '^[[01m^[[Kx_parse_color^[[m^[[K':
  ^[[01m^[[Kxterm.c:2425:61:^[[m^[[K ^[[01;35m^[[Kwarning: ^[[m^[[K'^[[01m^[[K%.*s^[[m^[[K' directive output may be truncated writing up to 2147483647 bytes into a region of size 28 [^[[01;35m^[[K-Wformat-truncation=^[[m^[[K]
         snprintf (rgb_color_name, sizeof rgb_color_name, "rgb:^[[01;35m^[[K%.*s^[[m^[[K/%.*s/%.*s",
                                                               ^[[01;35m^[[K^~~~^[[m^[[K
  ^[[01m^[[Kxterm.c:2425:56:^[[m^[[K ^[[01;36m^[[Knote: ^[[m^[[Kassuming directive output of 1 byte
         snprintf (rgb_color_name, sizeof rgb_color_name, ^[[01;36m^[[K"rgb:%.*s/%.*s/%.*s"^[[m^[[K,
                                                          ^[[01;36m^[[K^~~~~~~~~~~~~~~~~~~~^[[m^[[K
  ^[[01m^[[Kxterm.c:2425:56:^[[m^[[K ^[[01;36m^[[Knote: ^[[m^[[Kassuming directive output of 1 byte
  ^[[01m^[[Kxterm.c:2425:56:^[[m^[[K ^[[01;36m^[[Knote: ^[[m^[[Kassuming directive output of 1 byte
  ^[[01m^[[Kxterm.c:2425:7:^[[m^[[K ^[[01;36m^[[Knote: ^[[m^[[K'^[[01m^[[Ksnprintf^[[m^[[K' output between 7 and 6442450948 bytes into a destination of size 32
         ^[[01;36m^[[Ksnprintf (rgb_color_name, sizeof rgb_color_name, "rgb:%.*s/%.*s/%.*s",^[[m^[[K
         ^[[01;36m^[[K^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^[[m^[[K
   ^[[01;36m^[[K  digits_per_channel, color_name + 1,^[[m^[[K
     ^[[01;36m^[[K~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^[[m^[[K
   ^[[01;36m^[[K  digits_per_channel, color_name + digits_per_channel + 1,^[[m^[[K
     ^[[01;36m^[[K~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^[[m^[[K
   ^[[01;36m^[[K  digits_per_channel, color_name + 2 * digits_per_channel + 1)^[[m^[[K;
     ^[[01;36m^[[K~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^[[m^[[K

But running compile with a prefix arg processes escape sequences and produces
nice output even when Tramp process-environment is not customized:

  C-u M-x compile RET
  touch xterm.c; TERM=ansi make xterm.o
  RET



  reply	other threads:[~2019-12-08 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 12:37 Emacs shell: set TERM to ansi instead of dumb Trevor Spiteri
2019-11-23 15:42 ` Colin Baxter
2019-12-01 21:57 ` Juri Linkov
2019-12-04  1:48   ` rrandresf
2019-12-04 22:41     ` Juri Linkov
2019-12-05  0:11       ` tramp compilation buffer also affected (was: Emacs shell: set TERM to ansi instead of dumb) andrés ramírez
2019-12-08 21:33         ` Juri Linkov [this message]
2019-12-09  5:54           ` tramp compilation buffer also affected andrés ramírez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875ziq961a.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=emacs-devel@gnu.org \
    --cc=rrandresf@gmail.com \
    --cc=tspiteri@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.