help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Colors on TTY (v26)


From: Eli Zaretskii
Subject: Re: Colors on TTY (v26)
Date: Sun, 31 Mar 2019 20:41:10 +0300

> From: Aleksey Midenkov <midenok@gmail.com>
> Date: Sun, 31 Mar 2019 20:20:56 +0300
> Cc: help-gnu-emacs@gnu.org
> 
>  Emacs doesn't hard-code terminal names, but it has Lisp libraries
>  under lisp/term/ which are loaded by the terminal name.  If you have a
>  terminal that behaves like one of the ones known to Emacs, you need
>  only copy the relevant Lisp library under lisp/term/ to the name of
>  your terminal (with the .el extension), and things should work from
>  there.
> 
> I tried different terminal names. It seems, that it understands "xterm-" 
> prefix. The remaining part can be
> arbitrary: I literally tried "xterm-something" and it worked. I guess, there 
> is no such file "xterm-something" in the
> library. In any case, it's much better to rename terminal to "xterm-*", than 
> deal with distributed files.

Just do "ls lisp/term/*.el" and see what you've got there.

>  The full color list is indeed set during startup, so if you invoke
>  list-colors-display too early during startup, you will not see that.
>  This is not a bug, as Emacs can not know the color capabilities of the
>  terminal until it probes them.
> 
> This is indeed a bug: different result returned by same routine. Either 
> list-colors-display should not exist at an
> early stage or color capability probe should be done earlier.

What do you mean "should not exists"?  The code is there, it uses
whatever knowledge it has when you call it.  Where you did call it, it
didn't yet query the terminal to see how many colors it supports, and
didn't set up their names.  IOW, you are shooting yourself in the foot
by calling the function too early.  There are various hooks provided
by startup.el which allow you to call this function when colors are
set up; do that, and Bob's your uncle.



reply via email to

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