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: Sat, 22 Oct 2022 09:57:05 +0300 Message-ID: <83a65ouz0e.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> <83lepoi58p.fsf@gnu.org> <83y1tbxbbt.fsf@gnu.org> <83h6zxwujo.fsf@gnu.org> <2738f071-c87f-72cf-226f-6e8597cb07a8@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23581"; 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 Sat Oct 22 09:34:57 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 1om91z-0005kb-UL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Oct 2022 09:34:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1om8SU-00042q-Cr; Sat, 22 Oct 2022 02:58:14 -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 1om8SI-00042Z-Ja for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2022 02:58:02 -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 1om8SI-0003hY-4q for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2022 02:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1om8SH-0000sz-Us for bug-gnu-emacs@gnu.org; Sat, 22 Oct 2022 02:58: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: Sat, 22 Oct 2022 06:58: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.16664218333346 (code B ref 51993); Sat, 22 Oct 2022 06:58:01 +0000 Original-Received: (at 51993) by debbugs.gnu.org; 22 Oct 2022 06:57:13 +0000 Original-Received: from localhost ([127.0.0.1]:39603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1om8RU-0000ru-Qw for submit@debbugs.gnu.org; Sat, 22 Oct 2022 02:57:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1om8RS-0000rg-OJ for 51993@debbugs.gnu.org; Sat, 22 Oct 2022 02:57:11 -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 1om8RN-0002lP-B1; Sat, 22 Oct 2022 02:57:05 -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=lrxSsaURMzpDZdJ7qta7Bo7ATm5JLBWTpZVKffGzkpQ=; b=XN7OewEJOfpd YJ69z0fCcM3eonKhgK+Uszzn5dds1OAF9m1eyp8yCOQpUNlje1vi6qSc7m68vFPuidL/SaoCDu9Ee u0yjzaIfsyPy57OGUrzLFL6YLkR3ACyp1YrEIJzPa4fP3rQdOHPvwSXAk1gtEilPflpvE/cqq7JYr cDfYcT7pJM/+4WP7fZqz9yZlq0bFW0n8H9ioHEHNyT4+SDEeP1WrO3cKE0g7Dp7elIRe1C5wFuRsH Zhigms4fqI8UmFIdN6HQKOr0nQqqtoWihgvA4WLLKMV0hsmZsqq+iHfYg0JIpgc81z0cleo5pOBdI 6VySN7SzI0/Z8yRLzp+NkQ==; 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 1om8RM-00005F-PO; Sat, 22 Oct 2022 02:57:05 -0400 In-Reply-To: <2738f071-c87f-72cf-226f-6e8597cb07a8@gmail.com> (message from Jim Porter on Fri, 21 Oct 2022 20:46:47 -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@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246028 Archived-At: > Date: Fri, 21 Oct 2022 20:46:47 -0700 > Cc: larsi@gnus.org, 51993@debbugs.gnu.org, gregory@heytings.org > From: Jim Porter > > >>> $ emacs -Q --daemon > >>> $ emacsclient -a "" -c foo.txt > >>> $ emacsclient -a "" -c bar.txt > >>> > >>> ;; In the first client frame: > >>> foobar ;; Insert some text > >>> C-x C-c > >>> ;; Emacs prompts "Save file /path/to/foo.txt?..." > >>> > >>> Now try the above, but call `(server-stop-automatically 'delete-frame)' first (or replace `delete-frame' with `kill-terminal'; it doesn't matter). In this case, Emacs doesn't prompt to save the file. > > > > I'm not sure I see the direct relevance, and I don't think I see a bug > > in the above behavior. I'm probably missing something, but what? > > The issue in the quote above is that if you enable automatic server > shutdown in Emacs 29, it changes the behavior of exiting an emacsclient > even when it wouldn't stop the server (i.e. when there are other active > clients). That's surprising to me, I wouldn't expect that setting to > affect cases when it decides *not* to kill the Emacs daemon. Sounds like a bug to me, because it contradicts what the doc string says.