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

2

11

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?

Liable answered 4/9, 2011 at 14:37 Comment(0)
B
5

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.

Bavardage answered 4/9, 2011 at 17:49 Comment(3)
Does this properly delete the flymake files that flymake generates?Tish
Then this isn't very helpful. Way is really needed is an exit hook that does whatever normally happens when the fly make process exits without asking. Or at the very least, explicitly delete this file.Tish
Did you read the question? It's helpful for what the person actually asked. If you have a different question, ask it in a different question.Bavardage
G
12

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 .

Googol answered 15/9, 2011 at 14:15 Comment(1)
BTW, I don't use flymake any longer. Flymake was a cool idea, but the execution was wanting. There are problems with running flymake when you have lots of buffers open (flycheck.org/en/latest/user/…), which for me is "all the time." Flycheck, on the other hand, seems better executed. I've switched over to flycheck and am quite happy.Googol
B
5

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.

Bavardage answered 4/9, 2011 at 17:49 Comment(3)
Does this properly delete the flymake files that flymake generates?Tish
Then this isn't very helpful. Way is really needed is an exit hook that does whatever normally happens when the fly make process exits without asking. Or at the very least, explicitly delete this file.Tish
Did you read the question? It's helpful for what the person actually asked. If you have a different question, ask it in a different question.Bavardage

© 2022 - 2024 — McMap. All rights reserved.