From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <83lepoi58p.fsf@gnu.org> References: <9e47c871-a2c3-d764-bec9-d87abf3efe83@gmail.com> <79a53ecc-dbfc-d088-d80d-96f349be794a@gmail.com> <834k7vw2vb.fsf@gnu.org> <87czc4tosz.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4263"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 51993@debbugs.gnu.org, gregory@heytings.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 10 08:05:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohlue-0000qP-Qq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 08:05:17 +0200 Original-Received: from localhost ([::1]:56212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohlud-0004rh-9T for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Oct 2022 02:05:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohluQ-0004rZ-7G for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 02:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ohluP-00049V-Oa for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 02:05:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ohluP-0002uN-L5 for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2022 02:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2022 06:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51993-submit@debbugs.gnu.org id=B51993.166538188711156 (code B ref 51993); Mon, 10 Oct 2022 06:05:01 +0000 Original-Received: (at 51993) by debbugs.gnu.org; 10 Oct 2022 06:04:47 +0000 Original-Received: from localhost ([127.0.0.1]:45486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohluB-0002ts-FL for submit@debbugs.gnu.org; Mon, 10 Oct 2022 02:04:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohlu8-0002td-QI for 51993@debbugs.gnu.org; Mon, 10 Oct 2022 02:04:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohlu0-000483-MD; Mon, 10 Oct 2022 02:04:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VQfM6WQc+KSqD/X4JhjAlUVulJrGvEVD+GZVllozSFU=; b=ZyD5qB9lrEuh DGGgRb1ZJ7S9YGG0RBUJn/7dmDp85aWHcCRFTNeOfcdLj/3m1yRc78bp42TdGb4knAlfqpBnjFsXV 6tiuH0xTf/a9wdx6naOLIEdQLfQqCX93ceYx/DxpghPMoD+QiDtY0hheLif9FsTNtqXJbnxD3NiiH PVWtmpuu1/CHRISUMnWCnuUG9Pf0GaSqeAgPboSYKlI0JbVv2eZYKtw3hmBtj3Sf1WRTMgLkQRe/5 je4Lci1I3qN8/dUr70K7P7tDasVUIA5zsQVkImSZuAHm74ljCp+Rsli4JmKkmx8x8BXYKLVcYENaA PASIcUqxpnNT37yHq3bmpA==; Original-Received: from [87.69.77.57] (port=1607 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohlu0-0008Uq-0B; Mon, 10 Oct 2022 02:04:36 -0400 In-Reply-To: (message from Jim Porter on Sun, 9 Oct 2022 15:09:15 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244982 Archived-At: > Date: Sun, 9 Oct 2022 15:09:15 -0700 > From: Jim Porter > Cc: Eli Zaretskii , 51993@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.