michaelis@RDSS.UCAR.EDU (michaelis) (01/13/89)
I am rather new to Emacs, but I believe I have found a bug in the program running under VMS. To be specific, I am running GNU Emacs 18.50 under VMS 4.7 with a DEC VT320 terminal set up with a VT220 ID. The problem is in using the vt200.el keypad definition. My .emacs file listed below may help in giving you some clues to the problem...then again it may not. The problem is that when I type a ^G with nothing to abort, GNU forgets the cursor key definitions. However, after I attach to my parent process and then reenter Emacs, the cursor keys work again. The problem is rather annoying, and talking to the local experts around here has turned up nothing but a, "Hmmm, that shouldn't happen. I don't know what the problem could be." In a fit of desperation, I listed out the values of all Emacs' variables before and after the cursor key problem. Result: zilch. The variable listings were identical. I hope that you can find and kill the problem for your next release of GNU Emacs. While you are at it, you might make the program recognize a DEC VT320. -Matt Michaelis =============================== .emacs ========================================= ; Fix EMACS to use the bloody keypad keys. ; (load "du:[michaelis.emacs]vt200.elc") ; This is a bit of a clunky way to enable the cursor keys, but it is the ; best way I have found so far. (enable-arrow-keys) ; My personal whims. I like to have wrap mode on. I don't like to see ; the lines wrap around; it's too strange. (setq text-mode-hook 'turn-on-auto-fill) (setq-default truncate-lines t) (setq-default fill-column 78) ; ; Make C-x s do save-buffer since we can't use C-x C-s ; and make C-x S into save-some-buffers ; (define-key ctl-x-map "s" 'save-buffer) (define-key ctl-x-map "S" 'save-some-buffers) ===========================================================================
ouellette%tarkin.DEC@DECWRL.DEC.COM (Back on the critical path) (01/13/89)
From: DECWRL::"michaelis@rdss.ucar.edu" "michaelis 12-Jan-89 1030 MST"
To: bug-gnu-emacs@prep.ai.mit.edu
Subj: GNU Emacs bug in version 18.50 running on VMS
I am rather new to Emacs, but I believe I have found a bug in the
program running under VMS. To be specific, I am running GNU
Emacs 18.50 under VMS 4.7 with a DEC VT320 terminal set up with a
VT220 ID.
The problem is in using the vt200.el keypad definition. The
problem is that when I type a ^G with nothing to abort, GNU
forgets the cursor key definitions. However, after I attach to
my parent process and then reenter Emacs, the cursor keys work
again.
Yes this is a bug and I've had a fix for it for a while. Here
they are. Maybe they'll reach every corner of the net this
time...
Roland.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: SHIGEO::SASAKI "Marty Sasaki"
Just got a note from Jonathan Corbet about a fix to 18.51. I will
be putting it into the distribution that I have. Here it is...
================================================================
I noticed a problem a while back with VMS gnu emacs, run as a
subprocess. If you suspend it to do other work, it still catches ^C
interrupts, and interprets them as a quit command. The first time you
hit ^C, the screen flashes when you resume emacs, and you get the
"quit" message. The second time, and emacs hangs when you try to resume
it.
The solution is simply to ignore ^C when suspended. I have enclosed
below the VMS-specific portion of my modified sys_suspend() in sysdep.c
(taken from version 18.51).
#ifdef VMS
unsigned long parent_id;
int status
parent_id = getppid ();
if (parent_id && parent_id != 0xffffffff)
{
int oldsig = signal (SIGINT, SIG_IGN);
status = LIB$ATTACH (&parent_id) & 1;
signal (SIGINT, oldsig);
return (status);
}
return -1;
#else
Jonathan Corbet
National Center for Atmospheric Research, Field Observing Facility
corbet@rdss.ucar.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: DECWRL::"gentzel@godot.psc.edu" "David Gentzel 1-Jun-88 0203 EDT"
To: bug-gnu-emacs@prep.ai.mit.edu
Subj: VMS character dropping bug in 18.51
I tracked down this bug to the changes made to end_kbd_input for 18.51.
Below is the function (from sysdep.c) with the changed portions delimited
by #ifdef's on BUG. If you revert to the 18.50 version (i.e. leave BUG
undefined) everything seems fine. This bug causes both the "dropping of
characters when the system is slow" bug and the "^G makes arrow keys stop
working" bug.
The real question is: What was this change supposed to fix? I don't recall
seeing this fix on this mailing list. Was it from private correspondance
with rms? If so, could the originator or rms post the original? If this
was meant to fix a true bug, I would like to put together a working fix. As
it is, I doubt whatever it intended to fix can be as bad as the bugs it has
caused!
I've been running with the 18.50 version of this function in an otherwise
18.51 version for over a week now with no problems.
end_kbd_input()
{
#ifdef ASTDEBUG
printf ("At end_kbd_input.\n");
fflush (stdout);
sleep (1);
#endif
#ifdef BUG
if (ast_active) /* Don't wait if suspending from kbd_buffer_store_char! */
{
SYS$CANCEL (input_chan);
return;
}
#endif
SYS$SETAST (0);
/* Clear a flag, and tell ast routine above to set it. */
SYS$CLREF (input_ef);
waiting_for_ast = 1;
stop_input = 1;
SYS$CANCEL (input_chan);
SYS$SETAST (1);
#ifndef BUG
if (!ast_active)
#endif
SYS$WAITFR (input_ef);
waiting_for_ast = 0;
}
Dave Gentzel
Pittsburgh Supercomputing Center
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SHIGEO::SASAKI "Marty Sasaki" 22-JUN-1988 17:05
There was a bug found and fixed (at least that's what RMS has told
me that would cause characters to occasionally be lost. When I
installed the fix, emacs stopped hanging, although I haven't really
tested things enough to know whether this is fixed or whether I
just haven't run into the circumstances yet.
Anyway, the patch is to 18.51:
In sysdep.c, near kbd_input_ast:
/* This is called from keyboard.c at certain times
such as when about to longjmp out of a signal handler. */
sigfree ()
{
sigsetmask (0);
ast_active = 0;
}
In keyboard.c, after the definition of sigfree:
/* For VMS, sigfree is defined in sysdep.c. */
#ifdef VMS
#undef sigfree
#endif
Marty Sasaki
rms@WHEATIES.AI.MIT.EDU (Richard Stallman) (01/13/89)
I think that bug is gone in 18.52, which is the current release.