On Sun 22 Jan 2023 at 05:17:09 (+0100), Vincent Lefevre wrote: > On 2023-01-21 21:19:06 -0600, David Wright wrote: > > On Sun 22 Jan 2023 at 03:50:17 (+0100), Vincent Lefevre wrote: > > > 3. Type Ctrl-C (one or several times) in the terminal. > > > But nothing happens. > > > > I presume that's because the input buffer is already full, so > > you'd need what I think they called an out-of-band signal, > > like pressing Break used to do on an old teletype terminal. > > Why doesn't the terminal have a function to flush and discard > the input buffer or have some reserved space for the intr and > quit characters? Or automatically increase the size of the > input buffer?
IDK, I've never tried to write programs for the X system itself. > > > Is there any way to avoid this issue? > > > > Make sure that the application's data is saved, eg, ^X^S in emacs, > > but don't exit the application, eg, ^X^C in emacs. > > > > Then click on the X that closes the xterm window, which takes > > down both xterm and the application with it. This is effectively > > an out-of-band signal. > > This is what I've sometimes done until now, but in general, > I don't want to lose the work I've done in the shell, such > as temporary variable settings or things related to the > background jobs. The only suggestion I can give is that you start the applications concerned with &, so that you get the xterm prompt back. In this case, if I paste the large file, I do see almost the start of the file (I seem to lose just the first line, which rolls off the top), and ^C still works, returning to the prompt with return code 130. (I don't know whether all terminals behave like this: I just use xterm myself.) It's not a habit I use myself, because for some reason, I don't happen to make that mistake. That might be because I put the cursor very central in the emacs window when I paste large sections of text, and that's because I have (setq mouse-yank-at-point t), which inserts the text at point, not the cursor position. Cheers, David.