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#58909: 29.0.50; [WIP PATCH] Deleting the last frame of an emacsclient doesn't ask to save Date: Tue, 01 Nov 2022 08:39:25 +0200 Message-ID: <83y1svch5u.fsf@gnu.org> References: <9a70f868-ca50-52fc-af3e-23813af104f2@gmail.com> <83zgdcduxm.fsf@gnu.org> <53238b5b-3e0a-3dfe-eeba-f37cafa81f50@gmail.com> <838rkveq3n.fsf@gnu.org> <7de45884-b4c9-4a4c-777c-5db17b3bacca@gmail.com> <835yfzeobt.fsf@gnu.org> <7694fcf2-8982-9099-5eb8-39835d049847@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14905"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58909@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 01 07:40:36 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 1opkwu-0003kw-CH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Nov 2022 07:40:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opkwP-0000RM-JX; Tue, 01 Nov 2022 02:40:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opkwN-0000Q1-Dx for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 02:40:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opkwN-0007Cu-4L for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 02:40:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opkwL-0008UB-UO for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 02:40: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: Tue, 01 Nov 2022 06:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58909 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58909-submit@debbugs.gnu.org id=B58909.166728479232601 (code B ref 58909); Tue, 01 Nov 2022 06:40:01 +0000 Original-Received: (at 58909) by debbugs.gnu.org; 1 Nov 2022 06:39:52 +0000 Original-Received: from localhost ([127.0.0.1]:42526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opkw9-0008Th-BN for submit@debbugs.gnu.org; Tue, 01 Nov 2022 02:39:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opkw7-0008TU-KG for 58909@debbugs.gnu.org; Tue, 01 Nov 2022 02:39:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opkw1-00070j-6W; Tue, 01 Nov 2022 02:39:41 -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=XUI3bjSQ1JbVaAiD2rebCxFgHj0+bnr8TpPIh7afavA=; b=QhfFpPUlI7AA GOEL/TBs6i4go5X54fl0150ylQAB6XidRFXwjuoUea2i0eDEpm8li8yPCgnZ6J+wi6cESZwAwzPPu 0eSA/h1v/Dani2Wa5jP1/RTWxLwPj8EGi9hFbq7EYSVSAKy5qMCCl0Zvyt+5V5/zA9Ytn5k8ZeXG1 LJa/c94YHgwIoATyHD2bgpAMQExmlcxQniRONjhj4YAlsTMcvSvLtVFBeA6ACE5Z61g01zBN3g4dv t/GYejI1k9UKrxV0f+4hNVQiVXhEH8nDTPwMRVZsx9isiwViz6VI+lVVHdpjFtDZQxBjeYv5HzRaz RKLAT6wZI/YYhU/PZgNgOQ==; Original-Received: from [87.69.77.57] (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 1opkvz-0006Ap-En; Tue, 01 Nov 2022 02:39:39 -0400 In-Reply-To: <7694fcf2-8982-9099-5eb8-39835d049847@gmail.com> (message from Jim Porter on Mon, 31 Oct 2022 14:06:16 -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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246745 Archived-At: > Date: Mon, 31 Oct 2022 14:06:16 -0700 > Cc: 58909@debbugs.gnu.org > From: Jim Porter > > 1) For now, just make the change in my patch to 'delete-frame' in > src/frame.c to allow hooks in 'delete-frame-functions' to quit out of > frame deletion. That way, users who want the rest of the behavior in my > patch can just replace 'server-handle-delete-frame' with their own Elisp > function. This change isn't entirely without risk, since it could cause > some hooks to go from silently signaling an error to making it > impossible to delete frames, but I'm not sure that will come up in > practice (and if it does, the hooks can be fixed easily enough). I don't see how this would serve well the use case you want to enable. We are talking about prompting the user to save unsaved buffers, yes? So adding a hook in server-delete-client sounds like a much better solution to me, as it doesn't affect the (much more general) delete-frame in any way. > 2) After the Emacs 29 branch is cut, maybe (emphasis on maybe) discuss > the changes to prompting on emacs-devel, and possibly even commit it to > the master branch with the caveat that if it causes problems for anyone, > we back it out. Obviously not everyone follows emacs-devel, but this > would give people a chance to provide feedback, positive or negative. You can start the discussion now, from my POV. But if having a hook in server-delete-client is good enough, I don't see why we would need to discuss an actual behavior change. (And the proviso of backing out changes doesn't work in this project, IME: people get defensive about their changes, and perceive reverting them as personal insult. So we do that only in very extreme cases.)