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

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

emacs -nw, screen and 256 colors


From: David Hansen
Subject: emacs -nw, screen and 256 colors
Date: Mon, 26 Apr 2004 21:11:33 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Hi,

I'm using (emacs-version)

"GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit)
 of 2004-04-26 on robotron"

and would like to use it with GNU screen and 256 colors.
In a xterm without screen emacs can use 256 colors (shown
by `list-colors-display') but when running in screen emacs
shows only 8 colors (even the bold variants color8-color15
doesn't seem to work).

After changing everything in screeninfo.src to
colors#256, pairs#256 the example applications from the
xterm sources display all 256 colors.  Not sure if it's an
emacs or screen problem.

I had a look in the emacs sources but...  actually i don't
understand a single line of term.c ;)

The following c code shows 256 colors and 256 pairs with and
without screen:

/* -*- compile-command: "gcc colors.c -o colors -lncurses" -*- */
#include <ncurses.h>
#include <termcap.h>

int
main(void)
{
        initscr(); start_color();
        printw("# colors: %d\t# pairs: %d\n", COLORS, COLOR_PAIRS);
        printw("# colors: %d\t# pairs: %d\n",
               tgetnum("Co"), tgetnum("pa"));
        refresh(); getch(); endwin();
        return 0;
}

I'm using screen 4.0.2 of course with compiled 256 colors
support.

Did anyone got it to work?

-- David


reply via email to

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