[comp.emacs] ^S

nieh@geae2.steinmetz (nico nieh) (09/30/88)

I remembered people had trouble about ^S(search-forward) while 
using emacs on vt100. Now I am having the same problem.

Can someone out there give me some help.

Thanks,




Ko-Haw Nieh

General Electric Company               | ARPA: nieh@ge-crd.arpa            
Corporate Research and Development     | UUCP: nieh@boston.steinmetz.ge.com 
P.O BOX 8, K1-ES224 		       | UUCP: {uunet!}steinmetz!nieh!crd  
Schenectady, NY 12301		       | 518-387-7431                      

spolsky-avram@CS.YALE.EDU (Joel Spolsky) (10/02/88)

In article <12278@steinmetz.ge.com> nieh@geae2.steinmetz (KO-Haw nieh) writes:
| 
| I remembered people had trouble about ^S(search-forward) while 
| using emacs on vt100. Now I am having the same problem.
| 

VT100 uses ctrl-S as an XOF signal (suspend output). It probably
freezes everything until you hit ^Q (XON). If this is your problem,
try assigning search (and ^X^S - save - as well) to a different key
using global-set-key. There might be a way on your configuration to
disable XON/XOFF altogether.

+----------------+---------------------------------------------------+
|  Joel Spolsky  | bitnet: spolsky@yalecs     uucp: ...!yale!spolsky |
|                | arpa:   spolsky@yale.edu   voicenet: 203-436-1483 |
+----------------+---------------------------------------------------+
These opinions are mine. I do not represent Yale University in any way.

dharvey@wsccs.UUCP (David Harvey) (10/03/88)

In article <39323@yale-celray.yale.UUCP>, spolsky-avram@CS.YALE.EDU (Joel Spolsky) writes:
> In article <12278@steinmetz.ge.com> nieh@geae2.steinmetz (KO-Haw nieh) writes:
> | 
> | I remembered people had trouble about ^S(search-forward) while 
> | using emacs on vt100. Now I am having the same problem.
> | 
> 
> VT100 uses ctrl-S as an XOF signal (suspend output). It probably
> freezes everything until you hit ^Q (XON). If this is your problem,
> try assigning search (and ^X^S - save - as well) to a different key
> using global-set-key. There might be a way on your configuration to
> disable XON/XOFF altogether.
> 

Our new VT300 series terminals are really smart, trapping not only
XON/XOFF, but other things as well.  You can turn the XON/XOFF off,
but it seems to me that DEC should provide more information to us
normal peons (translated non-professionals) so that we could do this
in the code itself.  By that I mean turning them off on the way into
the editor, and back on, on the way out.  I am sure that it can be
done, but I don't know how.  Any suggestions for a quick fix to make
the cursor keys work with MicroEMACS 3.9e?  I don't mind using ^n,
^p, ^f, and ^b but some other people using it do.  This is of course due
to something in termcap (which I do not have source for) and the cursor
keys work normally on other machines such as the Amiga and IBM.  I am
standardizing on this editor because it works well in cramped quarters.


dharvey@wsccs

I am responsible for Nobody
and Nobody is responsible for me.

The only thing you can know for sure
is that you can't know anything for sure!

ugwiles@sybil (Dale Wiles) (10/03/88)

In article <12278@steinmetz.ge.com>, nieh@geae2 (nico nieh) writes:
>
>I remembered people had trouble about ^S(search-forward) while 
>using emacs on vt100. Now I am having the same problem.
>
>Can someone out there give me some help.
>
  The trouble we had with ^S with GNU-EMACS was that it locked up the
screen. We also had Emacs sending the random ^S/^Q to the screen. If
this is the same trouble your having, it isn't really Emacs's fault.
^S/^Q are standard flow control commands on some systems. ^S is the
control command to tell the host computer to stop sending stuff to the
screen.  ^Q is the command to tell it to start again. Unfortunatly,
Emacs also likes to use ^S and ^Q for it's own commands, hence the
problem.

  The way we fixed it is to first tell Emacs to stop printing the
^S/^Q's to the screen, and start interpreting them like a good little
editor, and then we told it to convert all of it's ^S/^Q commands to
use other keys. Just add this to your .emacs file and ^] and ^\ will
give you ^S and ^Q respectivly.

(enable-flow-control)		; Under stand ^S/^Q protocal.
; void out the keys ^S and ^Q.
; Make ^] behave like ^S and make ^\ behave like ^\
(setq keyboard-translate-table "/C-@/C-A/C-B/C-C/C-D/C-E/C-F/C-G/C-H/C-I/C-J/C-K/C-L/C-M/C-N/C-O/C-P/C-@/C-R/C-@/C-T/C-U/C-V/C-W/C-X/C-Y/C-Z/C-[/C-Q/C-S/C-^/C-_"

That should do it.
>Thanks,
  Your welcome.
-- 
	****************************************************
	* Dale 		  * You can make me go to college, *
	*     (ug) Wiles  *   but you can't make me think. *
	****************************************************

nwd@j.cc.purdue.edu (Daniel Lawrence) (10/04/88)

In article <698@wsccs.UUCP> dharvey@wsccs.UUCP (David Harvey) writes:
>                               Any suggestions for a quick fix to make
>the cursor keys work with MicroEMACS 3.9e?  I don't mind using ^n,
>^p, ^f, and ^b but some other people using it do.  This is of course due
>to something in termcap (which I do not have source for) and the cursor
>keys work normally on other machines such as the Amiga and IBM.  I am
>standardizing on this editor because it works well in cramped quarters.
>
>
>dharvey@wsccs

Version 3.10, due out to BETA testers late this month, and in general
release about 4 weeks after that has support for TERMCAP reading of the
function and cursor keys.  Not a quick fix.  Adding the needed source
to 3.9e is not hard, but probably is not worth the effort to try
and patch the binary.

			Daniel Lawrence		(317) 742-5153
			UUCP:	{ihnp4!pur-ee!}j.cc.purdue.edu!nwd
			ARPA:	nwd@j.cc.purdue.edu
			FIDO:	1:201/2 The Programmer's Room (317) 742-5533

beede@mingus.SRC.Honeywell.COM (Michael Beede) (10/05/88)

>[...]
>  The way we fixed it is to first tell Emacs to stop printing the
>^S/^Q's to the screen, and start interpreting them like a good little
>editor, and then we told it to convert all of it's ^S/^Q commands to
>use other keys. Just add this to your .emacs file and ^] and ^\ will
>give you ^S and ^Q respectivly.

>(enable-flow-control)		; Under stand ^S/^Q protocol.
>; void out the keys ^S and ^Q.
>; Make ^] behave like ^S and make ^\ behave like ^\
>(setq keyboard-translate-table "/C-@/C-A/C-B/C-C/C-D/C-E/C-F/C-G/C-H/C-I/C-J/C-K/C-L/C-M/C-N/C-O/C-P/C-@/C-R/C-@/C-T/C-U/C-V/C-W/C-X/C-Y/C-Z/C-[/C-Q/C-S/C-^/C-_"

>That should do it.

To save time for others, I will point out that not only is this
incorrect, if executed it will essentially destroy your emacs session.

The ``/'' characters should be ``\'' characters instead.  The effect
of executing this setq will be to change all control characters to /,
C, -, or capital letters (along with a number of other non-control
characters).

Perhaps the news software somewhere along the way changed the
backslashes to forward ones.  If not, please remember to include  code
samples that really work by chopping them out of a tested file,
instead of  hammering something together on the fly.  Not only is it
more likely to be non-lethal (this is a the first time I've actually
managed to croak my session trying something), it is less work.

Lastly, thanks for the fix.  After altering the string, it works like
a charm!

Mike Beede  MN55-7282              Secure Computing Technology Center
Honeywell Systems & Research Center  (612) 782-7147
2855 Anthony Lane South - Suite 130
Minneapolis MN	                   beede@src.honeywell.com