gnu: screen: support 256 colors
Commit Message
ludo@gnu.org (Ludovic Courtès) writes:
> myglc2 <myglc2@gmail.com> skribis:
>
>> I almost always run emacs in a gnu screen session.
>>
>> For iterm-256color, in guixSD I have observed that ...
>>
>> 'screen; emacs -nw' ... supports 16 colors.
>>
>> 'tmux; emacs -nw' ... supports 8.
>
> An indication that GNU Screen is superior! ;-)
>
> Seriously though, I think that’s because tmux does not provide a
> terminfo file. See <http://linsam.homelinux.com/tmux/terminfo.html>.
>
> Does “export TERM=screen” or “TERM=xterm” helps?
>
> Ludo’.
Actually, we have been building screen with 16 color support. With the
attached patch and the addition of ...
term xterm-256color
... to ~/.screenrc, emacs 'M-x list-colors-display' shows 256 colors and
emacs-zenburn-theme is pleasant to look at :-)
If emacs handled the "screen.xterm-256color" term type emitted by screen
when --enable-colors256 is set, then the 'term xterm-256color' would not
be required. This should be fixed upstream, but meanwhile, 'term
xterm-256color' is a fully functional workaround AFAIKT.
Comments
myglc2 <myglc2@gmail.com> skribis:
> Actually, we have been building screen with 16 color support. With the
> attached patch and the addition of ...
>
> term xterm-256color
>
> ... to ~/.screenrc, emacs 'M-x list-colors-display' shows 256 colors and
> emacs-zenburn-theme is pleasant to look at :-)
>
> If emacs handled the "screen.xterm-256color" term type emitted by screen
> when --enable-colors256 is set, then the 'term xterm-256color' would not
> be required. This should be fixed upstream, but meanwhile, 'term
> xterm-256color' is a fully functional workaround AFAIKT.
Good catch!
> From 1b05f484b6c4eb1827e1aa0e8b69f53f1db6bf80 Mon Sep 17 00:00:00 2001
> From: George Clemmer <myglc2@gmail.com>
> Date: Tue, 12 Jul 2016 13:57:28 -0400
> Subject: [PATCH] * gnu: screen: support 256 colors
>
> ---
> gnu/packages/screen.scm | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
Applied with a commit log.
Thanks!
Ludo’.
From 1b05f484b6c4eb1827e1aa0e8b69f53f1db6bf80 Mon Sep 17 00:00:00 2001
From: George Clemmer <myglc2@gmail.com>
Date: Tue, 12 Jul 2016 13:57:28 -0400
Subject: [PATCH] * gnu: screen: support 256 colors
---
gnu/packages/screen.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
@@ -49,11 +49,15 @@
("perl" ,perl)))
(arguments
`(#:configure-flags
- ;; By default, man and info pages are put in PREFIX/{man,info},
- ;; but we want them in PREFIX/share/{man,info}.
(let ((out (assoc-ref %outputs "out")))
- (list (string-append "--mandir=" out "/share/man")
- (string-append "--infodir=" out "/share/info")))))
+ (list
+ ;; By default, man and info pages are put in PREFIX/{man,info},
+ ;; but we want them in PREFIX/share/{man,info}.
+ (string-append "--mandir=" out "/share/man")
+ (string-append "--infodir=" out "/share/info")
+ ;; By default, screen supports 16 colors, but we want 256 when
+ ;; ~/.screenrc contains 'term xterm-256color'
+ (string-append "--enable-colors256")))))
(home-page "http://www.gnu.org/software/screen/")
(synopsis "Full-screen window manager providing multiple terminals")
(description
--
2.9.0