emacs-devel
[Top][All Lists]
Advanced

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

Re: tramp compilation buffer also affected


From: Juri Linkov
Subject: Re: tramp compilation buffer also affected
Date: Sun, 08 Dec 2019 23:33:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> 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 via email to

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