Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!bu.edu!bu-cs!snorkelwacker!apple!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!jis From: jis@ATHENA.MIT.EDU (Jeffrey I. Schiller) Newsgroups: gnu.emacs.bug Subject: Re: Problem with emacs on VAX/VMS 18.41.4 Message-ID: <9001230124.AA15907@osiris.MIT.EDU> Date: 23 Jan 90 01:24:14 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 49 Firstoff: Get a later version. There are a good number of sometimes subtle problems with running an Emacs that old under VMS. I brought up a version of 18.44 a few years ago under VMS (when it was the current version) and ran into several problems. One of them is the one you describe. The problem occurs only when running with a terminal speed of less then 2400 baud. To fix it in your current version of Emacs add the following define to s-vms.h: #define PENDING_OUTPUT_COUNT(FILE) ((*(FILE))->_ptr - (*(FILE))->_base) Then in dispnew.c add these lines (abstracted from Emacs 18.54): #ifndef PENDING_OUTPUT_COUNT /* Get number of chars of output now in the buffer of a stdio stream. This ought to be built in in stdio, but it isn't. Some s- files override this because their stdio internals differ. */ #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base) #endif Then search for code of the form: outq = stdout->_ptr - stdout->_base; Replace this code with: outq = PENDING_OUTPUT_COUNT (stdout); This ought to solve your problem. Basically as the comment above points out, VMS's stdout structure is different then UNIX. What happens with the unmodified code is that "outq" is computed to be some huge ridiculous number. If you are running at less then 2400 baud, GNU Emacs will sleep for this large number. The sleep isn't interruptible and you lose. Now before you go off and fix this I suggest you also try using the version of emacs you have to edit a file (that you don't care about!) that is larger then about 128K. See if the file gets garbled (extra new-lines added in odd places). If so then you have at least one more important bug to fix. The later versions of Emacs have this problem fixed. Actually the "problem" is in the VMS C runtime library and the later versions of Emacs have a workaround. Enjoy. -Jeff