Subject: Bug#3401: talk clears screen after showing error

From: [email-masked] (Ian Jackson)
Date: Thu, 18 Jul 96 17:52 BST

Closing Bug#3401, Peter Tobias writes:
> Guy Maor wrote:
> > Package: netstd
> > Version: 2.03-1
> >
> > After talk displays a connection error, for example "Your party is not
> > logged in." or "party is refusing messages", it restores the screen,
> > clearing the error.
> >
> > It should print the error after restoring the screen, not before.

I agree with Guy.

> Since I haven't received any answers to my last two mails I'll close
> this bug report. The behaviour mentioned above does not occur on
> the virtual console. It only happens with X11. This is a problem with
> X11 or the xterm terminfo entry which also affects other programs
> like elm (so it's not the fault of the netstd package).

I don't have the mails you sent to Guy, of course, but it seems to me
that this is a bug in talk, not in X11.

The problem is caused as follows:

The xterm has an `alternative screen' mode for fullscreen programs, so
that entering a full screen application doesn't destroy your
scrollback, &c.  When you exit a full screen program the scrolling
display from before you started it is restored.

I don't know if this feature is unique to xterm; I strongly suspect
that some (perhaps older) terminals do this too.  In any case, other
programs (and plain `talk' on OSF/1, too) have worked round it by not
displaying something fullscreen and then immediately exiting.  I think
that our talk should do the same.

It's arguable that this feature should be configurable in xterm.

In any case, closing the report because you think it is really a
problem with a different package is I think less than appropriate.  I
think you'll agree with me that there is a problem here, and so if you
wanted to get the thing off your `bug books' you should reassign it to
the X packages, not close it.

Anyway, for the reasons above I'm going to reopen this report.

Thanks,
Ian.

---

From: "Peter Tobias" <[email-masked]>
Date: Fri, 19 Jul 1996 00:19:14 +0200 (MET DST)

> that this is a bug in talk, not in X11.

I don't think it's a bug in talk.

> that our talk should do the same.

AFAIK this has nothing to do with the xterm. Ncurses and termcap have
the ability to switch to a different mode (terminfo: smcup/rmcup,
termcap: ti/te). OSF/1 (and Ultrix, AIX ...) doesn't use ti/te,
that's why it works on OSF/1. If you define ti/te for the xterm
entry on OSF/1 you'll get exactly the same results as on the Linux
system. IMHO the xterm terminfo entry should be changed to either
not include the smcup/rmcup (ti/te) entries by default or to provide
a new xterm entry which does not these entries (the user could choose
then).

If there are no objections I'll reassign the bug to ncurses.

Thanks,

Peter

-- 
 Peter Tobias                                EMail:
 Fachhochschule Ostfriesland                 [email-masked]
 Fachbereich Elektrotechnik und Informatik   [email-masked]
 Constantiaplatz 4, 26723 Emden, Germany     [email-masked]

---

From: [email-masked] (Bernd Eckenfels)
Date: Fri, 19 Jul 1996 04:16:23 +0200 (MET DST)

Hi,

>        IMHO the xterm terminfo entry should be changed to either

I think the save/restore feature for fullscreen applications should be
selectable by TERM/terminfo, yes. But on the other hand every application
should behave well if te/ti is present. Simplest solution would be to wait
for a keystroke before restoring the screen. (This would help in situations
where the romte end closes the connection and one is unable to see what was
written, too).

Greetings
Bernd

---

From: "Peter Tobias" <[email-masked]>
Date: Fri, 19 Jul 1996 16:14:40 +0200 (MET DST)

> where the romte end closes the connection and one is unable to see what was

AFAIK that would affect _every_ application that uses (n)curses! Isn't
it possible to add a control code to rmcup/te that forces (n)curses
to wait for a keystroke? Having it as an additional entry would be
nice.

Thanks,

Peter

---

From: Ian Jackson <[email-masked]>
Date: Fri, 19 Jul 96 21:57 BST

Peter Tobias writes ("Re: Bug#3401: talk clears screen after showing error"):
> [...] If you define ti/te for the xterm
> system.

No, that's not what I meant.  OSF/1's talk prompts you before exiting.

Ian.

---

From: Ian Jackson <[email-masked]>
Date: Fri, 19 Jul 96 22:52 BST

Peter Tobias writes ("Bug#3401: talk clears screen after showing error"):
...
> AFAIK [prompting before exiting fullscreen mode] would affect
> _every_ application that uses (n)curses! [...]

No, it only affects those few applications which can exit as a result
of something other than user input.

For example, dselect switches in and out of fullscreen mode quite a
bit, and there's no reason for it to prompt.  Every switch out of
fullscreen mode was immediately preceded by a user keypress anyway.

I think that programs like `talk' which can exit due to network and
similar activity should be changed.

Ian.