Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closing emacs in emacs

Tags:

emacs

Occasionally when using emacs in term mode I will mistakenly run emacs file instead of just opening the file. This will create a nested emacs client inside the current client. My problem is how to close the inner client only?

like image 727
Chris Seymour Avatar asked Dec 07 '25 10:12

Chris Seymour


1 Answers

Answer

You should be able to C-z out of it, then kill it with

kill %1

Explanation

C-z will suspend the current process, assigning it a job number and returning you to the shell.

The jobs command will show you the current jobs and their numbers. kill allows you to kill a process by its job number using the %n syntax.

like image 91
Chris Barrett Avatar answered Dec 10 '25 01:12

Chris Barrett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!