unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* guixSD iterm-256colors 'screen; emacs -nw' and/or 'tmux; emacs -nw' color support
@ 2016-02-05 18:00 myglc2
  2016-02-07 20:23 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: myglc2 @ 2016-02-05 18:00 UTC (permalink / raw)
  To: guix-devel

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.

Not only does this seem a bit lame when you consider that VGA supported
256 colors circa 1988, it means that most emacs themes either look awful
or aren't usable.

I thought I might submit a patch to make 'screen; emacs -nw' support 256
colors. However, if there is a strong preference for tmux, maybe I will
switch to tmux and fix that instead.

Comments or recomendations would be most welcome. - Thanks, George

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: guixSD iterm-256colors 'screen; emacs -nw' and/or 'tmux; emacs -nw' color support
  2016-02-05 18:00 guixSD iterm-256colors 'screen; emacs -nw' and/or 'tmux; emacs -nw' color support myglc2
@ 2016-02-07 20:23 ` Ludovic Courtès
  2016-07-12 19:32   ` [PATCH] gnu: screen: support 256 colors myglc2
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2016-02-07 20:23 UTC (permalink / raw)
  To: myglc2; +Cc: guix-devel

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’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] gnu: screen: support 256 colors
  2016-02-07 20:23 ` Ludovic Courtès
@ 2016-07-12 19:32   ` myglc2
  2016-07-13 10:41     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: myglc2 @ 2016-07-12 19:32 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-screen-support-256-colors.patch --]
[-- Type: text/x-patch, Size: 1447 bytes --]

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(-)

diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm
index a4eefd8..adee72d 100644
--- a/gnu/packages/screen.scm
+++ b/gnu/packages/screen.scm
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: screen: support 256 colors
  2016-07-12 19:32   ` [PATCH] gnu: screen: support 256 colors myglc2
@ 2016-07-13 10:41     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-07-13 10:41 UTC (permalink / raw)
  To: myglc2; +Cc: guix-devel

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’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-13 10:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 18:00 guixSD iterm-256colors 'screen; emacs -nw' and/or 'tmux; emacs -nw' color support myglc2
2016-02-07 20:23 ` Ludovic Courtès
2016-07-12 19:32   ` [PATCH] gnu: screen: support 256 colors myglc2
2016-07-13 10:41     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).