GNU bug report logs - #8838
tty-run-terminal-initialization fails

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Sat, 11 Jun 2011 22:16:01 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8838 in the body.
You can then email your comments to 8838 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sat, 11 Jun 2011 22:16:01 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: tty-run-terminal-initialization fails
Date: Sat, 11 Jun 2011 18:15:25 -0400
Package: emacs

With the current trunk on GNU/Linux:

TERM=xterm-vt220 emacs -Q -nw

gives an error at startup:

tty-run-terminal-initialization: Wrong type argument: number-or-marker-p, nil


Emacs 23.3 works fine with this TERM.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sat, 11 Jun 2011 22:55:02 GMT) Full text and rfc822 format available.

Message #6 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sat, 11 Jun 2011 18:54:24 -0400
Glenn Morris wrote:

> tty-run-terminal-initialization: Wrong type argument: number-or-marker-p, nil

The error comes from terminal-init-xterm at line 542, where version is nil.

I also noticed a pointless check at line 511:

(when xterm-extra-capabilities

This code is already inside a "(when xterm-extra-capabilities" at line 488.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sun, 12 Jun 2011 03:04:02 GMT) Full text and rfc822 format available.

Message #9 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sun, 12 Jun 2011 06:03:01 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Sat, 11 Jun 2011 18:15:25 -0400
> 
> Package: emacs
> 
> With the current trunk on GNU/Linux:
> 
> TERM=xterm-vt220 emacs -Q -nw
> 
> gives an error at startup:
> 
> tty-run-terminal-initialization: Wrong type argument: number-or-marker-p, nil

What kind of beast is xterm-vt220?  How is it different from xterm?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sun, 12 Jun 2011 05:53:02 GMT) Full text and rfc822 format available.

Message #12 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sun, 12 Jun 2011 01:52:47 -0400
Eli Zaretskii wrote:

> What kind of beast is xterm-vt220?  How is it different from xterm?

It's aterm:

http://www.afterstep.org/aterm.php

I've been using it for ages.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sun, 12 Jun 2011 07:47:02 GMT) Full text and rfc822 format available.

Message #15 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sun, 12 Jun 2011 09:46:23 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> What kind of beast is xterm-vt220?  How is it different from xterm?

$ infocmp xterm xterm-vt220
comparing xterm to xterm-vt220.
    comparing booleans.
        npc: T:F.
    comparing numbers.
    comparing strings.
        indn: '\E[%p1%dS', NULL.
        kDC: '\E[3;2~', NULL.
        kEND: '\E[1;2F', NULL.
        kHOM: '\E[1;2H', NULL.
        kIC: '\E[2;2~', NULL.
        kLFT: '\E[1;2D', NULL.
        kNXT: '\E[6;2~', NULL.
        kPRV: '\E[5;2~', NULL.
        kRIT: '\E[1;2C', NULL.
        ka1: NULL, '\EOw'.
        ka3: NULL, '\EOy'.
        kb2: '\EOE', '\EOu'.
        kbs: '\177', '^H'.
        kc1: NULL, '\EOq'.
        kc3: NULL, '\EOs'.
        kend: '\EOF', '\E[4~'.
        kf13: '\E[1;2P', '\E[25~'.
        kf14: '\E[1;2Q', '\E[26~'.
        kf15: '\E[1;2R', '\E[28~'.
        kf16: '\E[1;2S', '\E[29~'.
        kf17: '\E[15;2~', '\E[31~'.
        kf18: '\E[17;2~', '\E[32~'.
        kf19: '\E[18;2~', '\E[33~'.
        kf20: '\E[19;2~', '\E[34~'.
        kf21: '\E[20;2~', NULL.
        kf22: '\E[21;2~', NULL.
        kf23: '\E[23;2~', NULL.
        kf24: '\E[24;2~', NULL.
        kf25: '\E[1;5P', NULL.
        kf26: '\E[1;5Q', NULL.
        kf27: '\E[1;5R', NULL.
        kf28: '\E[1;5S', NULL.
        kf29: '\E[15;5~', NULL.
        kf30: '\E[17;5~', NULL.
        kf31: '\E[18;5~', NULL.
        kf32: '\E[19;5~', NULL.
        kf33: '\E[20;5~', NULL.
        kf34: '\E[21;5~', NULL.
        kf35: '\E[23;5~', NULL.
        kf36: '\E[24;5~', NULL.
        kf37: '\E[1;6P', NULL.
        kf38: '\E[1;6Q', NULL.
        kf39: '\E[1;6R', NULL.
        kf40: '\E[1;6S', NULL.
        kf41: '\E[15;6~', NULL.
        kf42: '\E[17;6~', NULL.
        kf43: '\E[18;6~', NULL.
        kf44: '\E[19;6~', NULL.
        kf45: '\E[20;6~', NULL.
        kf46: '\E[21;6~', NULL.
        kf47: '\E[23;6~', NULL.
        kf48: '\E[24;6~', NULL.
        kf49: '\E[1;3P', NULL.
        kf50: '\E[1;3Q', NULL.
        kf51: '\E[1;3R', NULL.
        kf52: '\E[1;3S', NULL.
        kf53: '\E[15;3~', NULL.
        kf54: '\E[17;3~', NULL.
        kf55: '\E[18;3~', NULL.
        kf56: '\E[19;3~', NULL.
        kf57: '\E[20;3~', NULL.
        kf58: '\E[21;3~', NULL.
        kf59: '\E[23;3~', NULL.
        kf60: '\E[24;3~', NULL.
        kf61: '\E[1;4P', NULL.
        kf62: '\E[1;4Q', NULL.
        kf63: '\E[1;4R', NULL.
        kfnd: '\E[1~', NULL.
        khome: '\EOH', '\E[1~'.
        kind: '\E[1;2B', NULL.
        kri: '\E[1;2A', NULL.
        kslt: '\E[4~', NULL.
        rin: '\E[%p1%dT', NULL.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sun, 12 Jun 2011 17:05:02 GMT) Full text and rfc822 format available.

Message #18 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sun, 12 Jun 2011 20:03:24 +0300
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Sat, 11 Jun 2011 18:54:24 -0400
> 
> Glenn Morris wrote:
> 
> > tty-run-terminal-initialization: Wrong type argument: number-or-marker-p, nil
> 
> The error comes from terminal-init-xterm at line 542, where version is nil.

Can you show all the responses of this terminal to the queries that
xterm.el sends to it?  It looks like it responds to some, but not to
others, and the combination is not one of those xterm.el expects.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sun, 12 Jun 2011 18:11:01 GMT) Full text and rfc822 format available.

Message #21 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: rgm <at> gnu.org, 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sun, 12 Jun 2011 21:08:52 +0300
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Cc: Glenn Morris <rgm <at> gnu.org>,  8838 <at> debbugs.gnu.org
> Date: Sun, 12 Jun 2011 09:46:23 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > What kind of beast is xterm-vt220?  How is it different from xterm?
> 
> $ infocmp xterm xterm-vt220
> comparing xterm to xterm-vt220.

The differences seem significant enough to justify a separate
configuration.




bug closed, send any further explanations to 8838 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 12 Jun 2011 19:56:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Sun, 12 Jun 2011 22:44:02 GMT) Full text and rfc822 format available.

Message #26 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Sun, 12 Jun 2011 17:42:59 -0500
On Sat, 11 Jun 2011 18:54:24 -0400 Glenn Morris <rgm <at> gnu.org> wrote: 

GM> Glenn Morris wrote:
>> tty-run-terminal-initialization: Wrong type argument: number-or-marker-p, nil

GM> The error comes from terminal-init-xterm at line 542, where version is nil.

Thank you for fixing that with rev 104578 through 104575 (104575 was the
essential fix).

GM> I also noticed a pointless check at line 511:

GM> (when xterm-extra-capabilities

GM> This code is already inside a "(when xterm-extra-capabilities" at line 488.

Thanks for catching that too, plus your other style fixes and
simplifications.

I disagree with replacing `when' with `if' in the case of just one
clause, which you did in several places.  Rather than simplifying the
code, it complicates reading it IMO.  Since `when' is a macro I think
any performance gains are minor.

Ted




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Tue, 14 Jun 2011 16:55:01 GMT) Full text and rfc822 format available.

Message #29 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Tue, 14 Jun 2011 11:54:40 -0500
On Sun, 12 Jun 2011 17:42:59 -0500 Ted Zlatanov <tzz <at> lifelogs.com> wrote: 

TZ> I disagree with replacing `when' with `if' in the case of just one
TZ> clause, which you did in several places.  Rather than simplifying the
TZ> code, it complicates reading it IMO.  Since `when' is a macro I think
TZ> any performance gains are minor.

Glenn, can you reply to this please?  If `when' should be discouraged,
tell me so, otherwise I'm not sure why you changed it.

Ted




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Tue, 14 Jun 2011 17:17:01 GMT) Full text and rfc822 format available.

Message #32 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Tue, 14 Jun 2011 13:16:40 -0400
Ted Zlatanov wrote:

> On Sun, 12 Jun 2011 17:42:59 -0500 Ted Zlatanov <tzz <at> lifelogs.com> wrote: 
>
> TZ> I disagree with replacing `when' with `if' in the case of just one
> TZ> clause, which you did in several places.  Rather than simplifying the
> TZ> code, it complicates reading it IMO.  Since `when' is a macro I think
> TZ> any performance gains are minor.
>
> Glenn, can you reply to this please?  If `when' should be discouraged,
> tell me so, otherwise I'm not sure why you changed it.

Oh, sorry. Just personal preference. I don't see the point of using:

(when
  single-form)

since it expands to

(if
  (progn
    single-form))

which seems like a waste of a progn to me. (Maybe the compiler optimizes
it away though, I don't actually know.)

In this case, I think I was just put in an anti-when mood by things of
the form:

(when a
  (when b
   ...))




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8838; Package emacs. (Tue, 14 Jun 2011 17:55:02 GMT) Full text and rfc822 format available.

Message #35 received at 8838 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 8838 <at> debbugs.gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Tue, 14 Jun 2011 13:54:53 -0400
Glenn Morris wrote:

> which seems like a waste of a progn to me. (Maybe the compiler optimizes
> it away though, I don't actually know.)

Comments in byte-opt indicate that it does. So the compiled coded ought
to neither know nor care if the source used when or if.




Information forwarded to owner <at> debbugs.gnu.org:
bug#8838; Package emacs. (Tue, 14 Jun 2011 20:01:02 GMT) Full text and rfc822 format available.

Message #38 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8838: tty-run-terminal-initialization fails
Date: Tue, 14 Jun 2011 14:58:55 -0500
On Tue, 14 Jun 2011 13:54:53 -0400 Glenn Morris <rgm <at> gnu.org> wrote: 

GM> Glenn Morris wrote:
>> which seems like a waste of a progn to me. (Maybe the compiler optimizes
>> it away though, I don't actually know.)

GM> Comments in byte-opt indicate that it does. So the compiled coded ought
GM> to neither know nor care if the source used when or if.

OK, thanks for explaining.  I'll keep happily using `when' :)

Ted





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jul 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 347 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.