Emacs/ESS: active process exist kill them and exit anyway?

I finally found a way to prevent this annoying question popping up each time I want to quit Emacs. It has been annoying me for ages, and all the solutions on the web did not work. So here is the code to add to .emacs:

(add-hook 'ess-post-run-hook 
	(lambda () (set-process-query-on-exit-flag 
		(get-ess-process ess-current-process-name) nil)) nil)

It was quite simple, indeed the solution was just to find the good hook, that was executed early enough (it looks like kill-emacs-hook is run after the question was already asked) but not too early (some tips here and there mentioning inferior-ess-mode-hook failed because the process doesn't exist yet when the hook is run). I was focusing on getting the process with (get-buffer-process (current-buffer)) and a lot of that kind of things, but it was apparently of little importance: everything just works when you do it on the right time.

Xavier Robin
Published Tuesday, May 25, 2010 18:49 CEST
Permalink: /blog/2010/05/25/emacs-ess-active-process-exist-kill-them-and-exit-anyway
Tags: Computers
Comments: 1

Comments

By Julian on Friday, December 10, 2010 00:04 CET

Thanks for this! It works like a charm, and that annoying pop up window is gone.

New comment

* denotes a mandatory field.

By submitting your message, you accept to publish it under a CC BY-SA 3.0 license.

Some HTML tags are allowed: a[href, hreflang, title], br, em, i, strong, b, tt, samp, kbd, var, abbr[title], acronym[title], code, q[cite], sub, sup.

Passer en français

Search

Tags

Background noise Books Computers Fun Hobbies Internet Me Mozilla My website Photo Politics Programming School Software Ubuntu pROC

Recent posts

Calendar

MonTueWedThuFriSatSun
12
3456789
10111213141516
17181920212223
24252627282930
31

Syndication

Recommend