home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 32.11 Using Word Abbreviation Mode Chapter 32
GNU Emacs
Next: 32.13 An Absurd Amusement
 

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


Previous: 32.11 Using Word Abbreviation Mode UNIX Power Tools Next: 32.13 An Absurd Amusement
32.11 Using Word Abbreviation Mode Book Index 32.13 An Absurd Amusement

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System