Control: retitle -1 kUP in xterm terminfo breaks shift-up in Emacs

On 2013-01-16 16:06 +0100, Margarita Manterola wrote:

> Package: ncurses-base
> Version: 5.9-4
>
> Hi,
>
> When building terminfo files in debian/rules, they are built with the -x 
> option:

This is necessary for hurd, and the bulk from misc/terminfo.src is also
built that way.

> This option causes unknown capabilities to be treated as user-defined,
> this means that they get included even if tic doesn't know about them.
>  In the case of xterm (and some xterm derivatives, like
> xterm-256color), this means that memu and meml are included.
> Decompiling the file and then recompiling it without -x causes these
> two options to go away.

And not only those; to see the whole story, it is necessary to run
infocmp with the -x option:

,----
| $ mkdir -p /tmp/terminfo                       
| $ infocmp xterm > /tmp/foo                       
| $ TERMINFO=/tmp/terminfo tic foo   
| $ infocmp -x -A /lib/terminfo -B /tmp/terminfo xterm xterm
| comparing xterm to xterm.
|     comparing booleans.
|       OTbs: T:F.
|       AX: T:F.
|     comparing numbers.
|     comparing strings.
|       meml: '\El', NULL.
|       memu: '\Em', NULL.
|       Cr: '\E]112\007', NULL.
|       Cs: '\E]12;%p1%s\007', NULL.
|       Ms: '\E]52;%p1%s;%p2%s\007', NULL.
|       Se: '\E[2 q', NULL.
|       Ss: '\E[%p1%d q', NULL.
|       kDC3: '\E[3;3~', NULL.
|       kDC4: '\E[3;4~', NULL.
|       kDC5: '\E[3;5~', NULL.
|       kDC6: '\E[3;6~', NULL.
|       kDC7: '\E[3;7~', NULL.
|       kDN: '\E[1;2B', NULL.
|       kDN3: '\E[1;3B', NULL.
|       kDN4: '\E[1;4B', NULL.
|       kDN5: '\E[1;5B', NULL.
|       kDN6: '\E[1;6B', NULL.
|       kDN7: '\E[1;7B', NULL.
|       kEND3: '\E[1;3F', NULL.
|       kEND4: '\E[1;4F', NULL.
|       kEND5: '\E[1;5F', NULL.
|       kEND6: '\E[1;6F', NULL.
|       kEND7: '\E[1;7F', NULL.
|       kHOM3: '\E[1;3H', NULL.
|       kHOM4: '\E[1;4H', NULL.
|       kHOM5: '\E[1;5H', NULL.
|       kHOM6: '\E[1;6H', NULL.
|       kHOM7: '\E[1;7H', NULL.
|       kIC3: '\E[2;3~', NULL.
|       kIC4: '\E[2;4~', NULL.
|       kIC5: '\E[2;5~', NULL.
|       kIC6: '\E[2;6~', NULL.
|       kIC7: '\E[2;7~', NULL.
|       kLFT3: '\E[1;3D', NULL.
|       kLFT4: '\E[1;4D', NULL.
|       kLFT5: '\E[1;5D', NULL.
|       kLFT6: '\E[1;6D', NULL.
|       kLFT7: '\E[1;7D', NULL.
|       kNXT3: '\E[6;3~', NULL.
|       kNXT4: '\E[6;4~', NULL.
|       kNXT5: '\E[6;5~', NULL.
|       kNXT6: '\E[6;6~', NULL.
|       kNXT7: '\E[6;7~', NULL.
|       kPRV3: '\E[5;3~', NULL.
|       kPRV4: '\E[5;4~', NULL.
|       kPRV5: '\E[5;5~', NULL.
|       kPRV6: '\E[5;6~', NULL.
|       kPRV7: '\E[5;7~', NULL.
|       kRIT3: '\E[1;3C', NULL.
|       kRIT4: '\E[1;4C', NULL.
|       kRIT5: '\E[1;5C', NULL.
|       kRIT6: '\E[1;6C', NULL.
|       kRIT7: '\E[1;7C', NULL.
|       kUP: '\E[1;2A', NULL.
|       kUP3: '\E[1;3A', NULL.
|       kUP4: '\E[1;4A', NULL.
|       kUP5: '\E[1;5A', NULL.
|       kUP6: '\E[1;6A', NULL.
|       kUP7: '\E[1;7A', NULL.
`----

The relevant capability here is kUP; removing it fixes the Emacs problem
for me.  

> I'm not sure of the best way of fixing this.  Either the obsolete keys
> shouldn't be included in the terminfo file, or the tic call should be
> done without -x.  I'm leaning towards the second, but I don't have
> enough knowledge of the package to be certain about it.

I'd like to get a comment from Thomas (CC'ed) before doing anything.
Thanks for the report.

Cheers,
       Sven


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to