home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!darwin.sura.net!gatech!destroyer!cs.ubc.ca!news.UVic.CA!spang.Camosun.BC.CA!dbarker
- From: dbarker@spang.Camosun.BC.CA (Deryk Barker)
- Newsgroups: comp.emacs
- Subject: Re: Problems with EMACS on a SUN using a MAC from Telnet
- Message-ID: <1992Dec30.222633.12966@spang.Camosun.BC.CA>
- Date: 30 Dec 92 22:26:33 GMT
- References: <168C79043.M16302@mwvm.mitre.org>
- Organization: Camosun College, Victoria B.C, Canada
- Lines: 38
- X-Newsreader: Tin 1.1 PL4
-
- M16302@mwvm.mitre.org writes:
- : When I key CtrlS to save the file, I lock up the editor. Does anybody know
- : any fixes for this?
-
- I presume you're referring to ^X^S? ANyway, as has been pointed out,
- it is almost certainly because ^S is the XOFF character which will
- hold up all terminal (workstaition) i/o when you have software flow
- control enabled. You may be able to get around this using stty
- parameters (can't remember which one, -xon?), but if you are coming
- through a net connection you may not. In which case you should use the
- evade-flow-control function which remaps all ^S to ^\ and ^Q (XON,
- i.e. the reverse of ^S) to ^^. It's given in the GNU Emacs LISP manual
- I think, but as I can never remember exactly where, I append the
- source below. Run this from your .emacs file.
-
- (defun evade-flow-control ()
- "Replace C-s with C-\ and C-q with C-^."
- (interactive)
- (let ((the-table (make-string 128 0)))
- (let ((i 0))
- (while (< i 128)
- (aset the-table i i)
- (setq i (1+ i))))
-
- ;; Swap `C-s' and `C-\'.
- (aset the-table ?\034 ?\^s)
- (aset the-table ?\^s ?\034)
- ;; Swap `C-q' and `C-^'.
- (aset the-table ?\036 ?\^q)
- (aset the-table ?\^q ?\036)
-
- (setq keyboard-translate-table the-table)))
-
-
- --
- Real: Deryk Barker, Computer Science Dept., Camosun College, Victoria B.C.
- Email: (dbarker@spang.camosun.bc.ca)
- Phone: +1 604 370 4452
-