emacs-devel
[Top][All Lists]
Advanced

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

Re: Device 0 is not a termcap terminal device


From: Alan Mackenzie
Subject: Re: Device 0 is not a termcap terminal device
Date: Wed, 2 Sep 2009 09:43:16 +0000
User-agent: Mutt/1.5.9i

Hi, Stefan!

On Tue, Sep 01, 2009 at 07:20:01PM -0400, Stefan Monnier wrote:
> > A little less that a year ago, I supplied a "me too" to this bug in which
> > batch programs would crash with the error message

> >     Device 0 is not a termcap terminal device

> > I have now tracked this bug down: `send-string-to-terminal' crashes in
> > -batch.  To see this, compare the following:

> Does the patch below help?

Yes, wonderfully!  Thank you very much!

Would you like me to make a proper patch (including changing the doc
string and the elisp page) out of this?

> > The documentation of the function in the Elisp manual for Emacs 22
> > just said that the string is sent to "the terminal", which presumably
> > means stdout.

> There's a subtle difference between the two, but yes, they used to be
> pretty much the same.  With multi-tty, the difference is made more
> significant.

> > In Emacs 23's Elisp, it says the string goes to "the selected frame's
> > terminal", which is clearly undefined in batch mode.

> Actually, it is well defined: when Emacs starts it starts with a special
> frame on a special terminal (a dumb terminal), later on, this terminal
> is usually deleted and replaced with an X11 or tty terminal, except in
> batch mode and in daemon mode.  Look for the `terminal-frame' variable
> and its uses in startup.el and frame.el to see it in action.

> > This change wasn't in the "incompatible changes" section of NEWS, so it
> > would appear to be a bug.

> send-string-to-terminal is rarely used, and even more so in batch mode
> (where you could argue that it worked by accident).  That's why nobody
> noticed the problem (and neither decided to fix it nor to document it).

Well, whether it worked by accident or design in batch mode, it's useful.
:-)

Funny thing is: running 000test.el has flagged up some CC Mode bugs which
weren't bugs in Emacs 22.  More work.  :-(

Thanks again!

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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