1

Sometimes in shell I end up executing a command which results in too much output.

For example, consider a wrong grep on a huge text file which results in 10,000 matches. The grep command completes quickly, but Emacs updates the shell buffer slowly and it takes forever to complete.

At that point I would like for Emacs to abort the output and return to the shell prompt. Any suggestions on how this can be achieved?

Currently I kill the shell process (bash) and start it again in the same buffer, but it would be nice to not have to do that

  • Could you give a recipe showing the scenario - just what you do, step by step? – Drew Mar 3 at 0:18
  • 2
    How about trying C-c C-c, which is bound to comint-interrupt-subjob -- does that suffice to stop/break your running process output? – lawlist Mar 3 at 0:41
  • I understood he said that its only the output that is slow - the command and process have finished. Emacs is taking time to process the output buffer. – RichieHH Mar 3 at 13:52
  • C-c C-c doesn't work. I run into this issue all the time, I just kill the shell buffer and restart what I was doing. I'd love to know how to get shell to just chill out. – Jordon Biondo Mar 3 at 15:57
  • What @JordonBiondo said. I do exactly the same thing. I know there is an output filter function so I am hoping something can be done there to stop writing to buffer – Miserable Variable Mar 3 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.