From owner-freebsd-questions@FreeBSD.ORG Fri Feb 27 15:55:43 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 3E404106566C for ; Fri, 27 Feb 2009 15:55:43 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-ew0-f166.google.com (mail-ew0-f166.google.com [209.85.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id 9FBC88FC14 for ; Fri, 27 Feb 2009 15:55:42 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by ewy10 with SMTP id 10so1194783ewy.43 for ; Fri, 27 Feb 2009 07:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=j+RxTuhWIJ+Y0Ht5QisH+Rukw3iir1tCI4q4SQLqdFk=; b=EpiQvA84MYNabNq8v68hlr20XJLh2hnesEGKjf6jSOrsS2xvYFPRp57vJpAGqgdVoR /1+uyCF2+LuwN2ubDO/rMJYIR7y8kNZTm2JhLbtwHFc0oZ6EGTRM0DzdOxCIETMr/ik+ RBY0HTYfNCwOpK0rmn1PnryE8Gu7kzfuJt1wU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=J5NTC3xyxiM6J+0OYf0gSkwFpVhsUmyzOU4q2OxH8R90PbKPOpIANlx1cRqRxD/4QP YvgvoV1XGYPiY0b56L7LNmpKHy7/SWiK68MdIuoTM9UlrayiiRhwnwNtjNle1RLu4rzQ 6VweouLPdkjl2zRV7Z4KlscCj61yo2E0BntwY= MIME-Version: 1.0 Received: by 10.210.35.10 with SMTP id i10mr539028ebi.63.1235750141789; Fri, 27 Feb 2009 07:55:41 -0800 (PST) In-Reply-To: <49A7E97E.2090306@gjunka.com> References: <49A7E97E.2090306@gjunka.com> Date: Fri, 27 Feb 2009 16:55:41 +0100 Message-ID: <3a142e750902270755w31df9154o7e90268e6f3e908f@mail.gmail.com> From: "Paul B. Mahol" To: Grzegorz Junka Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org 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 15:55:43 -0000 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. -- Paul