1
$ jobs
[1]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/dashboard/index.html.erb
[2]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/dashboard/index.html.erb
[3]   Stopped                 emacsclient -nw ./components/frontend/app/views/frontend/dashboard/_source.html.erb
[4]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/dashboard/source/_articles.html.erb
[5]   Stopped                 emacsclient -nw components/frontend/app/controllers/frontend_controller.rb
[6]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/managed_sources/completion.html.erb
[7]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/users/show/_tabbed_navigation.html.erb
[8]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/managed_contacts/index.html.erb
[9]   Stopped                 emacsclient -nw components/frontend/app/views/frontend/users/_form.html.erb
[10]   Stopped                 emacsclient -nw components/frontend/test/features/opportunities/delete_test.rb
[11]   Stopped                 emacsclient -nw components/frontend/app/controllers/frontend/managed_sources_controller.rb
[12]   Stopped                 emacsclient -nw components/frontend/test/features/managed_sources/new_and_create_test.rb
[13]-  Stopped                 emacsclient -nw components/frontend/app/views/frontend/managed_contacts/index.html.erb
[14]+  Stopped                 emacsclient -nw components/frontend/app/views/frontend/managed_sources/new_source_profile.html.erb

It takes me way to long to clear these jobs. I repeatedly do fg C-x C-c (which means "exit emacs")

right now. Is there an easier way?

update: I don't want to kill the emacs server. I'm simply trying to quickly close backgrounded emacsclient processes.

  • See manual. There is following advice: As an exception, when Emacs is started as a daemon, all frames are considered client frames, and C-x C-c never kills Emacs. To kill a daemon session, type M-x kill-emacs. But M-x kill-emacs won't save changed files. – mrc02_kr Aug 23 '17 at 14:25
  • I updated the question, clarifying my intentions. – american-ninja-warrior Aug 23 '17 at 14:35
  • 1
    According to doc (same website as above) you should start emacsclient with -n option. If you type C-x C-c (save-buffers-kill-terminal) in a client frame, that command does not kill the Emacs session as it normally does (see Exiting). Instead, Emacs deletes the client frame; furthermore, if the client frame has an emacsclient waiting to regain control (i.e., if you did not supply the ‘-n’ option) – mrc02_kr Aug 23 '17 at 14:41
  • Instead of -nw, have you considered visiting the files in your existing server frame. The command emacsclient -e '(find-file "/path/to/file")' has the advantage of returning immediately so there are no jobs to delete. – meuh Aug 23 '17 at 16:43

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.