GNU bug report logs - #51993
29.0.50; [PATCH] Killing emacsclient terminal with `server-stop-automatically' doesn't prompt to save files

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sat, 20 Nov 2021 04:30:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #62 received at 51993 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: larsi <at> gnus.org, 51993 <at> debbugs.gnu.org, gregory <at> heytings.org
Subject: Re: bug#51993: 29.0.50; [PATCH] Killing emacsclient terminal with
 `server-stop-automatically' doesn't prompt to save files
Date: Mon, 10 Oct 2022 09:04:38 +0300
> Date: Sun, 9 Oct 2022 15:09:15 -0700
> From: Jim Porter <jporterbugs <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 51993 <at> debbugs.gnu.org
> 
> The patch adds two new hooks: 'server-before-delete-client-functions' 
> and 'server-after-delete-client-functions'. These should give people the 
> ability to add whatever behaviors they think make sense when closing an 
> emacsclient connection. The default behavior is the same as the current 
> default (call 'save-some-buffers' before deleting the client, and do 
> nothing after). To do something like the 'delete-frame' configuration of 
> the current 'server-stop-automatically' API, you might do something like 
> this:

Isn't this a bit of over-engineering for such a simple problem?  Why
couldn't we have a user option to decide what to do, and then just do
it?  The place where we delete client frames is well determined, so
doing something sensible there should be easy.

Hooks make sense when some Lisp program needs to turn on or off some
aspects of Emacs behavior, not when a user needs to control that
behavior.  For users, controlling behavior with hooks should be
reserved to relatively complex and/or obscure aspects of the behavior.

Thanks.




This bug report was last modified 2 years and 163 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.