screen-users
[Top][All Lists]
Advanced

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

Re: Italic text with screen inside urxvt and some termcap questions


From: Sebastien Delafond
Subject: Re: Italic text with screen inside urxvt and some termcap questions
Date: Tue, 20 Jan 2009 18:21:54 +0000 (UTC)
User-agent: slrn/pre1.0.0-2 (Linux)

On 2008-09-22, Micah Cowan wrote:
> If we make screen use \033[3m for italics (instead of its current use
> for standout), and \033[7m for standout (ANSI's "negative image"), then
> all pre-existing termcap/terminfo definitions for screen will be wrong,
> and users will have to be especially careful not to use newer versions
> of screen with older termcap/terminfo definitions for screen.
> Nevertheless, it seems like it might not be a terrible idea to start
> migration, or at least support a configuration option for it. I don't
> know when such a change might be effected, though.
>
> Nevertheless, it seems like it might not be a terrible idea to start
> migration, or at least support a configuration option for it. I don't
> know when such a change might be effected, though.

I am trying to get screen to output italic too; my terminal,
rxvt-unicode, does it fine with print '\e[3mfoo\e[m', but it of course
does not work inside of screen, because of what you describe above.

I've tried several things so far, but my rather poor understanding of
termcap/terminfo in general is hindering my efforts :)

Here's a list of things I've tinkered with:

  1) in .screenrc:
    a) terminfo * smso=\E[7m:rmso=\E[27m:sitm=\E[3m:ritm=\E[23m
    b) termcap * so=\E[7m:se=\E[27m:ZH=\E[3m:ZR=\E[23m
  2) in the 4.0.3 source:
    c) change the termcaps:

========================================================================
--- screen/termcap.c      2003-09-08 07:45:36.000000000 -0700
+++ screen+seb/termcap.c  2009-01-17 23:25:53.000000000 -0800
@@ -1009,8 +1009,10 @@
        }
       if (D_SO)
        {
-         AddCap("so=\\E[3m:");
-         AddCap("se=\\E[23m:");
+         AddCap("ZH=\\E[3m:");
+         AddCap("ZR=\\E[23m:");
+         AddCap("so=\\E[7m:");
+         AddCap("se=\\E[27m:");
        }
       if (D_MB)
        AddCap("mb=\\E[5m:");
========================================================================

    d) change the terminfo:

========================================================================
diff -U 2 -r screen/terminfo/screeninfo.src screen+seb/terminfo/screeninfo.src
--- screen/terminfo/screeninfo.src        2003-07-21 08:33:36.000000000 -0700
+++ screen+seb/terminfo/screeninfo.src    2009-01-20 10:18:26.000000000 -0800
@@ -17,7 +17,8 @@
        kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE,
        rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l,
-       rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7,
+       rmkx=\E[?1l\E>, rmso=\E[7m, rmul=\E[24m, rs2=\Ec, sc=\E7,
        sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=,
-       smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, 
+       smso=\E[7m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, 
+       sitm=\E[3m, ritm=\E[23m,
        civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l,
        op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
========================================================================

My system (Debian sid) uses terminfo (rather than termcap, as I
understand it), so I'm not sure 1a and 2a do much of anything. I've
nevertheless tried all any and combinations of the 4 changes above, to
no avail.

Could you give me quick nudge toward the right direction ? Am I
totally missing the point here ?

If I manage to eventually get it right, with your help, then
contributing a patch for that configuration option would be something
much more within my usual field of expertise :)

Thank you very much for your time,

--Seb





reply via email to

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