unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Davis Herring <herring@lanl.gov>
To: Karl Fogel <kfogel@red-bean.com>,
	Emacs Development <emacs-devel@gnu.org>
Subject: Re: PROPOSAL: Control over process cleanup in `save-buffers-kill-emacs'.
Date: Fri, 22 Sep 2017 13:11:07 -0600	[thread overview]
Message-ID: <c9daf4dd-8eb3-a0bc-1548-3f72c4e66322@lanl.gov> (raw)
In-Reply-To: <87poai36hq.fsf@red-bean.com>

> 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 started

This 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.



  reply	other threads:[~2017-09-22 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 18:58 PROPOSAL: Control over process cleanup in `save-buffers-kill-emacs' Karl Fogel
2017-09-22 19:11 ` Davis Herring [this message]
2017-09-22 19:26 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9daf4dd-8eb3-a0bc-1548-3f72c4e66322@lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    --cc=kfogel@red-bean.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).