From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter 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: Mon, 31 Oct 2022 12:38:04 -0700 Message-ID: References: <9a70f868-ca50-52fc-af3e-23813af104f2@gmail.com> <83zgdcduxm.fsf@gnu.org> <83bkpretpn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23296"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58909@debbugs.gnu.org To: Eli Zaretskii 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 Mon Oct 31 20:39:25 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 1opad1-0005qC-8S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 20:39:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opacj-00048s-SB; Mon, 31 Oct 2022 15:39: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 1opacg-00048b-Tf for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 15:39: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 1opacg-00045Y-M0 for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 15:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opacg-0007wN-A8 for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 15:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Oct 2022 19:39:02 +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.166724509530451 (code B ref 58909); Mon, 31 Oct 2022 19:39:02 +0000 Original-Received: (at 58909) by debbugs.gnu.org; 31 Oct 2022 19:38:15 +0000 Original-Received: from localhost ([127.0.0.1]:41858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opabu-0007v5-Mj for submit@debbugs.gnu.org; Mon, 31 Oct 2022 15:38:14 -0400 Original-Received: from mail-pl1-f171.google.com ([209.85.214.171]:42738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opabs-0007uo-6R for 58909@debbugs.gnu.org; Mon, 31 Oct 2022 15:38:13 -0400 Original-Received: by mail-pl1-f171.google.com with SMTP id c24so11642317pls.9 for <58909@debbugs.gnu.org>; Mon, 31 Oct 2022 12:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=5qX9UmbV8LXc+CSlZxfUjriv1ilOhsQTVE0RD0sqgZE=; b=hKbDfZzrLgG5wtTp4Y+p4uznNL4knH5TaZwhMn2ay04Miq0w/+W8gxPNNB5WCamaAS Iz231aCp7ZhkpLF9TVfFEaFnmWbX7tD0a29O3O/2kNhpho9KgwA0Yf/0RE4b1uxbgKgM ql0tZLrDi5sQSo/Rj/7aWXbYgWQNmxnU26v4+3bg3PQookZCFJX55NyloxpB/+daush6 /U7w9Hc3d2o7Evh7XeK27UmJdB4Lm8Q/ZL1P7dRwsDcgpn98K/c6v1db3YGXeD0blfwd ewBXmJhGQmCvwncEVinXSH5t9RzvnmzXNEpRYqSTWkz1GklN+lo0m7OueXsxJUr/xf5Z DpCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5qX9UmbV8LXc+CSlZxfUjriv1ilOhsQTVE0RD0sqgZE=; b=gwFkssnIUVwQPpfeUZc8OYRSSWJ/AB6emu6t29pHaAlBgZTbsv7zpp6zvlnNSkf9DG VZACzHHSDIJUCAEUWIiW3nvjCQMr37I/OhSFFaU4uBWmEzdNbstGKArPjhli8VvD4PSr me6mfx1kH3o6qUFyFSFjdI5anu2shXNjyak91CFd2hzhEgl11DK9WVXUJq2oqu5nN4El UvJnHeXxInnEAd61fnywnJKDgEWE3ta7nVlHxMfZ/c08Vc9xkU01dyh4mF/TIHUDTPyB e+ow1vw3f2IXlm7c0qupkOyt0rA2XeumvrPQAxaX4KY8U5ixCaVRvo1n9Dn+QPIbbPnt bJ5A== X-Gm-Message-State: ACrzQf2yRpSRO20hmi0S0MG65KqZeorZ84AoBCa+f8FyU2iY+IFN+20L kJ3hI4rL66qvRDuBILFiJHA= X-Google-Smtp-Source: AMsMyM6Z0E0ZdXsLbeRruvNygQli3F37kIwuUMOgg3lGI1SwX6EEafQaWtSzQfhJ2AmoN+AxVF2Bxg== X-Received: by 2002:a17:902:b402:b0:179:e5b0:96d3 with SMTP id x2-20020a170902b40200b00179e5b096d3mr15668406plr.142.1667245086385; Mon, 31 Oct 2022 12:38:06 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id s6-20020a170902ea0600b001872999f58esm1604705plg.189.2022.10.31.12.38.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 12:38:05 -0700 (PDT) Content-Language: en-US In-Reply-To: <83bkpretpn.fsf@gnu.org> 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:246715 Archived-At: On 10/31/2022 11:25 AM, Eli Zaretskii wrote: >> I think it does about the same amount of harm as pressing 'C-x C-c' in >> an emacs client. > > How can you say that? "C-x C-c" kills the entire terminal, whereas > "C-x 5 0" kills just one frame! When there's only one frame left for the client, 'C-x 5 0' *also* kills the entire terminal. That's the only case I want to add a prompt to. I agree that if you're only killing a frame, there's no sense in prompting. But when killing a frame gets upgraded into killing the entire terminal, it then has the same end result as having pressed 'C-x C-c'. Shouldn't Emacs then ask the user about what to do before killing the terminal? Of course, 'C-x C-c' also has the effect of killing any other frames for that client, but that that doesn't apply there's only one frame. Still, 'C-x C-c' still prompts in that case too. My understanding is that it does so because when an application is waiting for the emacsclient to finish, you can't go back from killing the terminal/client; you *can* (usually) go back if you're only killing a frame. See my other message about this too: we could make sure Emacs only prompts the user when deleting a frame if doing so would kill a terminal that's actually waiting for some files to be saved. If the client was invoked with "--no-wait", we could just silently delete the frame: there's no application waiting for a file.