Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!dialogic!drich From: drich@.UUCP (Dan Rich) Newsgroups: comp.emacs Subject: Re: Problem with GNU Emacs. Keywords: Problem, search-forward, scroll lock. Message-ID: <1013@dialogic.UUCP> Date: 13 Dec 89 19:21:54 GMT References: <3071@uceng.UC.EDU> <14572@eerie.acsu.Buffalo.EDU> Sender: news@dialogic.UUCP Reply-To: drich@dialogic.UUCP (Dan Rich) Distribution: usa Organization: Dialogic Corp., Parsippany, NJ Lines: 61 In article <3071@uceng.UC.EDU> sramacha@uceng.UC.EDU (Sridhar Ramachandran) writes: > >I have been having a problem with my GNU Emacs. Whenever I use >a sequence with C-S in it like search-forward and saving-buffers, >I scroll lock the terminal. It is as if Emacs hasn't read the >C-S at all. Then I have to type C-q to unlock the screen. >I am using a terminal with vt100 settings and default >Emacs settings. > >Can somebody help me out of this problem? > >--Sridhar Ramachandran. Ah, one of these problems that rears its ugly head every few months or so. Yes, it would be nice if all of us had hardware flow control, but, for now, it just isn't possible. I have been using the elisp code below (not written by me) for a couple of years now, and it seems to solve the problem. Now, if we could only convince RMS to include it in with the GNU Emacs distribution... :-( 8<------------------------------ Cut Here ------------------------------>8 ;;; $Source: /u1/third_party/gnuemacs.v17/lisp/term/RCS/xon.el,v $ ;;; $Author: rlk $ ;;; $Locker: $ ;;; $Header: xon.el,v 1.1 86/01/29 14:51:49 rlk Exp $ (set-input-mode nil t) (setq keyboard-translate-table "\000\^a\^b\^c\^d\^e\^f\^g\^h\^i\^j\^k\^l\^m\^n\^o\^p\^q\^r\^s\^t\^u\^v\^w\^x\^y\^z\033\^q\035\^s") (setq losing-keyboard t) (defun help-for-losing-terminal () "Describe losing flow-controlled terminals." (let ((buffer (current-buffer))) (pop-to-buffer (get-buffer-create "*Help*")) (insert "The terminal you are using reserves the C-s and C-q characters for a special use, known as auto-Xon/Xoff flow control, and thus you cannot use these characters for any purpose, and neither can Emacs. Therefore, we have to replace any key combinations (such as C-s and C-x C-q) with new key combinations not using these characters. We have chosen the characters C-~ (or C-^ on some terminals) and C-\\ (control-backslash) to directly replace these characters, to make the conversion easier. Very few commands are bound to keystrokes using these two characters, thus this should not be too much of a problem. If you accidentally type C-s by mistake your terminal will freeze and you will have to type C-q to unfreeze it. For example, the command to search forward, which is bound to C-s, will now be bound to C-~. The command to insert the next character typed, C-q, is now C-\\. The command C-x C-q is now C-x C-\\.") (pop-to-buffer buffer))) 8<------------------------------ Cut Here ------------------------------>8 -- Dan Rich | ARPA: drich%dialogic@uunet.uu.net UNIX Systems Administrator | UUCP: uunet!dialogic!drich Dialogic Corporation | - Time is an illusion. Lunchtime, doubly so. - (201) 334-8450 x213 | Douglas Adams