From owner-freebsd-questions@FreeBSD.ORG Fri Feb 27 19:31:42 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9A971065670 for ; Fri, 27 Feb 2009 19:31:42 +0000 (UTC) (envelope-from cv@gjunka.com) Received: from outbound-mail-158.bluehost.com (outbound-mail-158.bluehost.com [67.222.39.38]) by mx1.freebsd.org (Postfix) with SMTP id C54EE8FC08 for ; Fri, 27 Feb 2009 19:31:42 +0000 (UTC) (envelope-from cv@gjunka.com) Received: (qmail 11953 invoked by uid 0); 27 Feb 2009 19:29:00 -0000 Received: from unknown (HELO host79.hostmonster.com) (74.220.207.79) by outboundproxy5.bluehost.com with SMTP; 27 Feb 2009 19:29:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gjunka.com; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=K4sGu/sZ9njVZdBPw4nWxFbgvTsn3cEv1CyS4ajbInK3hlMfhtjnIiQ1Qz1G/IfxAf/mwAPqknvTI0PVthupRnvnp/tLU3/IEa8w+DBWrdTVkoCzjq46J4K8JYvWMC1A; Received: from host-84-9-59-118.dslgb.com ([84.9.59.118] helo=[192.168.1.66]) by host79.hostmonster.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Ld8Qt-0003Vw-04; Fri, 27 Feb 2009 12:31:39 -0700 Message-ID: <49A83FAB.8000307@gjunka.com> Date: Fri, 27 Feb 2009 19:31:55 +0000 From: Grzegorz Junka User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: "Paul B. Mahol" , freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Identified-User: {630:host79.hostmonster.com:gjunkaco:gjunka.com} {sentby:smtp auth 84.9.59.118 authed with cv+gjunka.com} Cc: Subject: Re: Emacs doesn't want to support 256 colors in terminal window X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2009 19:31:43 -0000 Paul B. Mahol wrote: > On 2/27/09, Grzegorz Junka wrote: > >> Hi, >> I hope someone will be able to help with this. I've already checked all >> resources I could google but still can't get it to work. Basically my >> terminal can show more than 16 colors but emacs doesn't want to use >> these colors. >> >> I run FreeBSD (7.1-RELEASE) as a virtual machine and use it without any >> X interface, only through ssh from a Windows machine (the host). I have >> set up both putty and ssh in cygwin to report term type as >> 'xterm-256color' (putty in the configuration window and xterm using -tn >> command line parameter). >> >> That part works fine because I can run scripts available on the internet >> (256colors2.pl, colortest), which surely show more than 8 colors in my >> terminal window. The problem is when I run emacs and type: M-x >> list-colors-display. Emacs shows only boring 8 colors (not even 16). >> >> A bit about my configuration. Emacs was compiled without X11 support >> (from ports emacs-nox11-22.3). I also don't have xterm installed. I >> tried to set env variable TERM=xterm-256color but it didn't help. There >> is a special note about using terms in emacs in >> "/usr/local/share/emacs/22.3/lisp/term/README" I unpacked xterm.el.gz >> from that folder and tried to supply it as term/xterm-256color.el or >> term/xterm.el to emacs, but that also didn't work. >> >> It is interesting to note, that when I type: tput color I get different >> values depending on the user and terminal: >> >> user grzesiu, putty, TERM=xterm-256color, tput colors: 114 >> the same user, putty and TERM value, but tput colors: 123, another trial >> and output is 80 >> user root, putty, TERM=xterm, tput colors: 184 >> the same user and putty, but TERM=xterm-256color, tput colors: 115 >> user grzesiu, ssh from cygwin, TERM=xterm-256color, tput colors: 139 >> >> I don't understand these values because when I run these scripts above I >> don't see any difference in colors shown (subjectively). In neither of >> these configurations emacs show more than 8 colors. Any ideas or >> suggestions greatly appreciated. >> > > This looks like emacs problem. Are you sure that emacs was compiled > with 256 color support? (at least I know that elinks can be configured > to support 88 and/or 256 and/or real colors) > Also is there some kind of termcap option in emacs to be changed/read? > I dont use emacs but in vim: > :set t_Co=256 > will show 256 colors if terminal supports it. > Actually if t_Co termcap setting is N, vim will not try to show more > than N colors even if terminal supports X(>N) colors. > > FreeBSD port doesn't allow to configure Emacs in any way, neither from the original port, nor from the nox11 version. I don't think there is any special option for emacs to show 256 colors. Wherever I could find some information about this, people were saying that Emacs version >=22 supports 256 colors without any additional configuration. As I mentioned, Emacs not only doesn't show 256 colors, but not even 16, which I bet should be supported without any problems. No matter what I get only 8 colors, even if terminal is able to shows much much more. Another strange thing is that as far as I can see xterm-256color in FreeBSD termcap is simply an alias to xterm. Nevertheless, with these scripts mentioned above I can view more than 16 colors even if TERM is defined only as xterm. Do you think I should report it as a defect in emacs ports? Greg