Reputation: 85765
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?
Upvotes: 3
Views: 431
Reputation: 9262
Just use the command M-x kill-emacs
inside the inner emacs. Backgrounding and killing it works fine but it is a little bit more hackish.
Upvotes: 5
Reputation: 119
You should use the top Emacs. Starts emacs with:
emacs --daemon
Starts all frame with:
emacsclient -c
From your term:
emacsclient -n
Or you should use eshell
instead.
Upvotes: 0
Reputation: 3375
You should be able to C-z
out of it, then kill it with
kill %1
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.
Upvotes: 6