From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: Is it possible to have 256 colors in Emacs on framebuffer-enabled tty Date: Wed, 31 Aug 2011 18:23:27 +0200 Message-ID: <858vq9zh1c.fsf@iznogoud.viz> References: <877h5xtxl8.fsf@gmail.com> <83hb51ftt4.fsf@gnu.org> <87aaas69bp.fsf@gmail.com> <8762lg60zo.fsf@gmail.com> <4E5C0C35.7050300@harpegolden.net> <87ei03805d.fsf@gmail.com> <83zkiqeq7i.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1314807834 5116 80.91.229.12 (31 Aug 2011 16:23:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2011 16:23:54 +0000 (UTC) Cc: emacs-devel@gnu.org, zwz To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 31 18:23:48 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QynZp-0005e0-0u for ged-emacs-devel@m.gmane.org; Wed, 31 Aug 2011 18:23:45 +0200 Original-Received: from localhost ([::1]:45402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QynZo-0002TW-6P for ged-emacs-devel@m.gmane.org; Wed, 31 Aug 2011 12:23:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QynZl-0002TG-EY for emacs-devel@gnu.org; Wed, 31 Aug 2011 12:23:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QynZk-0002jM-Aa for emacs-devel@gnu.org; Wed, 31 Aug 2011 12:23:41 -0400 Original-Received: from mx01.lb01.inode.at ([62.99.145.1]:59602 helo=mx.inode.at) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QynZe-0002i9-F1; Wed, 31 Aug 2011 12:23:34 -0400 Original-Received: from [85.127.94.30] (port=12078 helo=iznogoud.viz) by smartmx-01.inode.at with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QynZZ-0000UE-Ub; Wed, 31 Aug 2011 18:23:30 +0200 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.76 (FreeBSD)) (envelope-from ) id 1QynZY-0000TZ-87; Wed, 31 Aug 2011 18:23:28 +0200 Mail-Followup-To: Eli Zaretskii , zwz , emacs-devel@gnu.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 62.99.145.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143665 Archived-At: Eli Zaretskii writes: >> From: zwz >> Date: Tue, 30 Aug 2011 22:05:50 +0800 >> >> Do you mean if there is a lisp/term/fbterm.el that deals with the >> escapes, then it is possible to have 256 colors in Emacs on fbterm? > > No, such an fbterm.el does not exist. But given enough information > about this terminal, it could be written in a way that's similar to > xterm.el. I think the 256 colors support in term/xterm.el is general enough to support fbterm as well. At least the following quick'n'dirty adaption from term/linux.el seems to work for that (provided the terminfo stuff is correctly installed, TERM is set to fbterm and the code below is saved to term/fbterm.el somewhere in load-path). #+BEGIN_SRC emacs-lisp ;; -*- no-byte-compile: t -*- (load "term/xterm") (defun terminal-init-fbterm () "Terminal initialization function for linux fbterm." (unless (terminal-coding-system) (set-terminal-coding-system 'utf-8-unix)) ;; It can't really display underlines. (tty-no-underline) (ignore-errors (when gpm-mouse-mode (require 't-mouse) (gpm-mouse-enable))) (xterm-register-default-colors)) ;;; fbterm.el ends here #+END_SRC