6

My Emacs is running in foreground in terminal emulator, where I am also running some background processes.

My Emacs is garbled by the stdout and stderr output of the background process.

Besides redirecting the stdout and stderr output of the background process to /dev/null, is there another way to make my emacs not bothered by the background process? For example, can something be done on the emacs side?

Thanks.

Tim
  • 4,987
  • 7
  • 31
  • 60
  • instead of running the other processes in the background, could you run them in an Emacs shell? That is, run `M-x shell` to start a terminal inside Emacs, and start your processes there? That way you could still monitor their output, without it interfering with other Emacs buffers. – Tyler Jun 13 '16 at 17:45

2 Answers2

6

No, there isn't, if you don't want to silence your background processes.

You could use something like tmux or GNU Screen for your background processes.

Or you could run them in another terminal.

But Emacs has no way of knowing that some other process is outputting characters to the terminal, as far as I know.

asjo
  • 1,037
  • 8
  • 12
5

In emacs, Ctl-L will refresh the screen, removing any extra stuff written by your background process.

If the background process only emits stuff every once in a while, then you can just refresh each time.

Hashcut
  • 151
  • 1
  • 2
  • 1
    Thanks. How many intended purposes does ctrl-L have? I thought it centers the current line in the screen. – Tim Jun 12 '16 at 20:45