Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting rid of "buffer has running process" confirmation when the process is a flymake process

Tags:

emacs

flymake

Is there a way to tell emacs to always kill flymake processes when I'm closing the associated buffer? I don't want to get the confirmation when the only process associated with the buffer is a flymake process?

like image 475
kanak Avatar asked Sep 04 '11 14:09

kanak


2 Answers

You can also turn the process-query-on-exit-flag off with advice:

(defadvice flymake-start-syntax-check-process (after
                                               cheeso-advice-flymake-start-syntax-check-1
                                               (cmd args dir)
                                               activate compile)
  ;; set flag to allow exit without query on any
  ;;active flymake processes
  (set-process-query-on-exit-flag ad-return-value nil))

This has the same effect as the patch above, but it does not require modifying flymake.el .

like image 103
Cheeso Avatar answered Nov 07 '22 16:11

Cheeso


Here's a patch. The gist is to modify the function that invokes flymake to use set-process-query-on-exit-flag to set the process-query-on-exit-flag variable to nil for the flymake process. See also C-h f set-process-query-on-exit-flag.

like image 29
Ross Patterson Avatar answered Nov 07 '22 17:11

Ross Patterson