|
From: | Davis Herring |
Subject: | Re: PROPOSAL: Control over process cleanup in `save-buffers-kill-emacs'. |
Date: | Fri, 22 Sep 2017 13:11:07 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
This means that neither `kill-emacs-query-functions' nor `kill-emacs-hook' happen in time to offer any fine-grained control over whether the user gets queried about active processes. And since the `confirm-kill-processes' flag applies to all processes, one can't use it to customize *which* processes one is queried about at exit time. I propose moving `kill-emacs-query-functions' to before the process-killing block, so that hooks can do things with processes before Emacs asks about those processes.
Given your use case, it seems a lot less hackish to just introduce a user option that is one of
1. an abnormal hook called with each new process startedThis would allow the use of `set-process-query-on-exit-flag' in a natural way, but would run before any existing code configured the process in similar fashion.
2. a new normal hook called at the beginning of `save-buffers-kill-emacs'This would also allow the existing flag to be used, and would be unsurprising and easy to find.
3. a regular expression matching process and/or process-buffer names for which not to query on exit
This would allow access by non-programmers, but would make the query flag something of a lie.
Davis --This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.
[Prev in Thread] | Current Thread | [Next in Thread] |