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
Publié le mardi 25 mai 2010 à 18:49 CEST
Lien permanent : /blog/2010/05/25/emacs-ess-active-process-exist-kill-them-and-exit-anyway
Tags : Informatique
Commentaires : 1


Par Julian le vendredi 10 décembre 2010 à 00:04 CET

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

Nouveau commentaire

* L'astérisque dénote un champ obligatoire.

En soumettant votre message, vous acceptez qu' il soit publié sous licence CC BY-SA 3.0.

Quelques balises HTML sont autorisées : a[href, hreflang, title], br, em, i, strong, b, tt, samp, kbd, var, abbr[title], acronym[title], code, q[cite], sub, sup.

Switch to English



Bruit de fond Hobbys Humour Informatique Internet Livres Logiciels Moi Mon site web Mozilla Photo Politique Programmation Scolaire Ubuntu pROC

Billets récents