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 13:01:55 -0700 Message-ID: <7de45884-b4c9-4a4c-777c-5db17b3bacca@gmail.com> References: <9a70f868-ca50-52fc-af3e-23813af104f2@gmail.com> <83zgdcduxm.fsf@gnu.org> <53238b5b-3e0a-3dfe-eeba-f37cafa81f50@gmail.com> <838rkveq3n.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="18924"; 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 21:03:20 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 1opb0C-0004mk-Kt for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 21:03:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opb01-0002U9-Dk; Mon, 31 Oct 2022 16:03:09 -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 1opazv-0002TW-CR for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 16:03:05 -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 1opazu-0004Xo-As for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 16:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opazt-0000XX-Sy for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 16:03:01 -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 20:03: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.16672465262012 (code B ref 58909); Mon, 31 Oct 2022 20:03:01 +0000 Original-Received: (at 58909) by debbugs.gnu.org; 31 Oct 2022 20:02:06 +0000 Original-Received: from localhost ([127.0.0.1]:41872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opayz-0000WN-Kp for submit@debbugs.gnu.org; Mon, 31 Oct 2022 16:02:05 -0400 Original-Received: from mail-pl1-f180.google.com ([209.85.214.180]:35358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opayx-0000Vr-AD for 58909@debbugs.gnu.org; Mon, 31 Oct 2022 16:02:03 -0400 Original-Received: by mail-pl1-f180.google.com with SMTP id y4so11716884plb.2 for <58909@debbugs.gnu.org>; Mon, 31 Oct 2022 13:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=tJGDBpx1zGrhFsFhbOzDEZmEZmDdHrcq9tN30PQ3IAo=; b=KC4avW09XPWyK+65K5pxrTPXY8RdGoW3oJ+W0mCmEhqnQMvOErj9JTQ0l/zU2tCEYJ I8STQIffNljP1B2p9Smb/oa+03DHl7K68X/68S7EDvZR8E8HQYvNz3JB0f4gQrFyrCjf ixQR8XewOw3MPeINSRIqKkYwQ/iA+mqExEwzFWMvY33JJgmE5qrWbPuwsBQRKW0C3oY5 S9yXeUjj2/dMdjcViGnmJzZkncjBrpNkPk+2L36KdquviBM50iJUJpC68gNFuQ8X+OMN /Njl4PHv6O/a5Ares+gCU2Krlfzq6qipbXODBebAu1kU47nWeTu+U6lHoeU1aePVHhLb qcpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tJGDBpx1zGrhFsFhbOzDEZmEZmDdHrcq9tN30PQ3IAo=; b=zyQoarKKgT5pfYI+iFvoiKmgEmMTisuLuYcaTc8+1B2OLGZrkxjhM7A7ZIeh3cf2WV CZr4pSysQf+1DmvUZtwTSL+9GFvJRLIbi/lMRFCemz//yn+cHBlwvghYz8iIasYU/qI/ As3QhTWcGKt6wtVhuJMsvr3Uuc/3WzCM1HgUeKjlzPpjg64GnI51oRIIHUxp8IYQve5d O3JEFZsguRtiyJ7DEA+w368/4fjoHa3WVeO/ujTQuReqFXqWL14J3SrD5ISDzlbcwMly jkJ9ADm2jjytsEbtbz0Tb47JTu2Rw7JHn0JeRnubd3r6cv80OoO9tSX+40MvFCj2jhmB Eu1g== X-Gm-Message-State: ACrzQf1InOoMm9bQ2Qzd7KsA5zwr969v2rcUQ9IR01EAi0RJxdnO/ylA d3fLCH6twk4hkfq8E+c0UsmR9XFhug4= X-Google-Smtp-Source: AMsMyM6oZ9QxB0P6wURrUALC7pbIapGxajmSCzduUAT6hdOcjG49CAigTJA6bQ8zyVTb/w8N+/2QMQ== X-Received: by 2002:a17:902:8ec8:b0:186:9c32:79c8 with SMTP id x8-20020a1709028ec800b001869c3279c8mr16250828plo.105.1667246517379; Mon, 31 Oct 2022 13:01:57 -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 68-20020a17090a09ca00b0021134a19ae2sm4548058pjo.50.2022.10.31.13.01.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 13:01:56 -0700 (PDT) Content-Language: en-US In-Reply-To: <838rkveq3n.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:246718 Archived-At: On 10/31/2022 12:43 PM, Eli Zaretskii wrote: >> Date: Mon, 31 Oct 2022 12:28:23 -0700 >> Cc: 58909@debbugs.gnu.org >> From: Jim Porter >> >>> I'm uneasy with this incompatible behavior change. I can think of >>> some legitimate use cases where "C-x 5 0" should not prompt, e.g., if >>> the user intends to keep editing the file, and no application is >>> waiting for the client to finish. Why break such flows? >> >> After thinking about this some more, I realized that I didn't properly >> address this part of your message. If no application is waiting for the >> client to finish, then the user hopefully used "--no-wait" when starting >> emacsclient. > > No, I meant that the user invoked emacsclient from the shell prompt, > for example. As opposed to some application invoking emacsclient via > $EDITOR or similar. If a user simply typed "emacsclient file.txt", that would visit file.txt in an existing frame (if possible), so that frame wouldn't be associated with the emacsclient process the user just started. Pressing 'C-x 5 0' wouldn't need to prompt then: it's not deleting the last frame associated with that client, so the code in 'server-handle-delete-frame' doesn't apply. (Note: It's possible that the frame in question is the last frame of some *other* client though.) A user might instead type "emacsclient -c file.txt" (or use "-t", etc) to create an all-new frame. In that case, my patch would prompt. But if the user is already typing "emacsclient -c file.txt", then "emacsclient -nc foo.txt" is just one more character, and it would make it explicit that the client isn't waiting around for file.txt. Then my patch would *not* prompt.