[Chapter 32] 32.12 Getting Around Emacs Flow Control Problems
Author: Jerry Peek, Tim O'Reilly & Mike Loukides
Date: 1998-08-04T21:46:40Z

#

| Chapter 32 GNU Emacs |

## 32.12 Getting Around Emacs Flow Control Problems

A common annoyance among Emacs users is the flow control (41.2) problem that occurs in some situations involving terminals (as opposed to PCs or workstations). Some operating systems and data communications devices (terminals, modems, networks, etc.) use the characters CTRL-s and CTRL-q to act as "stop" and "go" signs for terminal input and output, to prevent buffer overflow.

Many more modern systems use other means of flow control, such as extra hardware, but others still use the CTRL-s/CTRL-q convention. This is especially likely in situations where there are multiple data communications devices between you and the actual computer (for example, a terminal talking to a modem, talking to another modem, talking to a terminal server, talking to a local area network, talking to a computer, remotely logged in to another computer...).

In general, the more pieces of hardware between you and the computer, the more likely that CTRL-s and CTRL-q are used as flow control characters; this means that those two characters are not accessible to Emacs.

To find out whether the problem affects you, simply invoke Emacs and type CTRL-s. If you see the `Isearch:` prompt in the minibuffer, all is probably well. Otherwise, nothing will happen and your terminal will appear to hang - any other keys you type will have no effect. Actually, you will have told some piece of hardware not to accept any more input. To get out of this, just type CTRL-q. Any keys you press in between will then take effect.

An easy way to get around this problem is to type `ESC x enable-flow-control`. This feature lets you type CTRL-\ in place of CTRL-s, and CTRL-^ in place of CTRL-q. Of course, you'll have to remember that anytime you would normally press CTRL-s you press CTRL-\ instead.

To set this up so it works all the time, add this line to your .emacs file:

>     (enable-flow-control)

Remember that you should exit and restart Emacs to make changes to your .emacs file take effect.

- BR, DC

32.11 Using Word Abbreviation Mode |  | 32.13 An Absurd Amusement