🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.mush
Article #837

Re: instant notification of new mail in curses mode

#837
From: Barton E. Schaefer
Date: Sun, 07 May 1989 19:37
53 lines
3166 bytes
In article <1628@taux01.UUCP> cjosta@tasu77.UUCP (Jonathan Sweedler) writes:
} I am running mush on a sun console.  I originally used the tool
} interface to mush, but [...] I found that I actually
} prefer the curses interface.  The only problem with this interface is
} that I no longer get instant notification of my incoming mail.

The reason for this lies in a basic difference between the line/curses
mode interfaces and the tool interface.

Of the three interfaces, only the tool mode is event driven.  That means
that mushtool essentially spends its time waiting for an event, which
might come from anywhere -- keyboard, mouse, or timer.  The timer events
are set up by mush itself, and when one comes in, mush performs the check
for new mail.  If new mail has arrived, mush checks to see if it is in
iconic state, and acts appropriately.

The line and curses modes, on the other hand, are not designed to handle
events from multiple sources.  In those modes, mush spends its time
waiting for input from stdin (usually the keyboard).  Instead of checking
for mail once per minute, mush checks after each command.  Many of the
features that you find lacking in tool mode depend on this synchronous
I/O behavior -- I'm not sure what would be required in order to handle
asynchronous events like the timer for checking new mail.

} Is there anyway to change this easily?

No.  It might, however, be possible to add a command that would cause mush
to stop and wait for new mail -- then you could give that command before
closing the shelltool to an icon.

} I think it would be useful if there was some way to tell mush to print a 
} string out (this would allow me to change my icon) or run a program when
} new mail arrives.

Given the command suggested above, you could handle that.

} Also, something that I noticed from the very early days of mush.  If you
} are running mush in curses mode and the cursor is an inverse bar and is
} resting on a mail message that does not fill the line (i.e. there are
} blank spaces on the right side of the cursor) and you suspend mush
} with a ^Z and then resume it, the blank spaces on the right side of the
} screen stay highlighted even after you move the cursor onto another 
} mail message.

This is a curses oddity and I'm not sure mush could do anything about it.
I'll put it on the list of things to look at.

} Jonathan Sweedler  ===  National Semiconductor Israel
-- 
Bart Schaefer       "And if you believe that, you'll believe anything."
							-- DangerMouse
CSNET / Internet                schaefer@cse.ogc.edu
UUCP                            ...{sun,tektronix,verdix}!ogccse!schaefer
Technical Details
Message-ID: <2603@ogccse.ogc.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!blake!ogccse!schaefer
References: <1628@taux01.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!blake!ogccse!schaefer
From: schaefer@ogccse.ogc.edu (Barton E. Schaefer)
Newsgroups: comp.mail.mush
Subject: Re: instant notification of new mail in curses mode
Keywords: new mail
Message-ID: <2603@ogccse.ogc.edu>
Date: 7 May 89 19:37:34 GMT
References: <1628@taux01.UUCP>
Reply-To: schaefer@ogccse.UUCP (Barton E. Schaefer)
Organization: Oregon Graduate Center, Beaverton, OR
Lines: 53