1
votes

When editing code inside a GNU screen session (which I do a lot) using emacs, I sometimes get into a state where everything still works (e.g. editing and scrolling works normally), except for Ctrl-S which is absolutely catastrophic in emacs. Ctrl-S seems to be silently ignored. As if I never pressed it. Other Ctrl combinations seem to work fine (e.g. Ctrl-X).

I tried this to recover:

  • Reset terminal from within the shell.
  • Reset terminal in GNU screen.
  • Restart emacs.

None of this helped.

What happened?

How can I bring Ctrl-S back to life?

1

1 Answers

4
votes

What happened?

You most likely pressed Ctrl-A and then F by accident. This toggles flow control handling in GNU screen. When flow control handling is enabled in GNU screen Ctrl-S and Ctrl-Q (Xon and Xoff) are no longer passed to the inner application.

How can I bring Ctrl-S back to life?

To disable flow control handling in GNU screen (the default) press Ctrl-A and then F again. It should then show -flow in the status line. Ctrl-S and Ctrl-Q are now working again in emacs as expected.