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

Switch to English

Chercher

Tags

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

Billets récents

Calendrier

lun.mar.mer.jeu.ven.sam.dim.
12
3456789
10111213141516
17181920212223
24252627282930
31

Syndication

Recommender