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 14:06:16 -0700 Message-ID: <7694fcf2-8982-9099-5eb8-39835d049847@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> <7de45884-b4c9-4a4c-777c-5db17b3bacca@gmail.com> <835yfzeobt.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="22095"; 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 22:08:13 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 1opc0y-0005UV-KF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 22:08:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opc0L-0002HJ-BQ; Mon, 31 Oct 2022 17:07:33 -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 1opbzs-0007sI-6X for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 17:07:10 -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 1opbzq-0003ZW-UG for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 17:07:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opbzq-0002ID-Fa for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2022 17:07: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 21:07: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.16672503868767 (code B ref 58909); Mon, 31 Oct 2022 21:07:02 +0000 Original-Received: (at 58909) by debbugs.gnu.org; 31 Oct 2022 21:06:26 +0000 Original-Received: from localhost ([127.0.0.1]:42045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opbzG-0002HL-4L for submit@debbugs.gnu.org; Mon, 31 Oct 2022 17:06:26 -0400 Original-Received: from mail-pl1-f179.google.com ([209.85.214.179]:34726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opbzD-0002H6-Ko for 58909@debbugs.gnu.org; Mon, 31 Oct 2022 17:06:24 -0400 Original-Received: by mail-pl1-f179.google.com with SMTP id v17so8810943plo.1 for <58909@debbugs.gnu.org>; Mon, 31 Oct 2022 14:06:23 -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=3ms3Ghlmjhv3m2dpWu/ilR/zgusZqOXJ6N8fusKh3cw=; b=I2OPz2VVt7yAhpoidri8ytEGNN7oU2+8J+0UMQcLfal/27mEFl5p9Ws6ueuFmSlp5G 7PZpAwh9MyndjT3mGoumsVThXAVTiAWT6XoVqzydLCuswNwRcAfnRUT46GJCDY0lW5Sn BzpbwmNdd0kFk8J0heTF+kFmnhs7jgp0w5DR5nXNoJEtT3YH/ZUUbmhxwfh+JerUdu27 FBIuc/yXmbkXhxNxhCS7sF3QursUbrTC2kHIE/6j3gEnp7yx/1U9A048ScNOPiJ2OeRB syVcnx1TQvwk5GfRfAyxis797lb4lSGZD/6o1Gj0gTRJ0Z9H845J0L6Nn+d4kBglpuYk VHUA== 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=3ms3Ghlmjhv3m2dpWu/ilR/zgusZqOXJ6N8fusKh3cw=; b=V9MxQ3nRtJ2sDLmZjNBb21MCHBrFLqs+5vEcIn1bRCU98yMWfsxlb7XDAv7/ufhqIH Ou3v1a51FsJMbQkOeideWrBhiGEwcsVrWON816PzTqXMNL7/Bz7QRzJGXGalseEkTXlc UmR1QeXARa1cMnV1mUbQ+h7iOWVAQUfWHZ2AFxNICiYp6+EpFk/aUn/uTgmurs8enTUh mnhgmXtlXL7kVjdIdDwVlnxDcEozzYLZluJF+HKQMWVSV0EpB+Wiyj0GFDhcRiXkNwQe qVydRYG8qCr4LQOxVXDX0cXjL1qnGZDc6wPpb/rMfZR2lrNow4PmqayoDfdJE4rNFDbz r5Lw== X-Gm-Message-State: ACrzQf3PKSquitUyK/+ymmkdLizrBjFnMCKgoaHkgXvyld5qQPIA9+54 RtelxN9bWjph4o583hdsRYk= X-Google-Smtp-Source: AMsMyM7C9bBshHQ8HhVrHzuEDGRZeLS3cKktVwbHjLrAWqtIWz73DRddPK/DS7G8rb2XRVHOlRANhg== X-Received: by 2002:a17:903:240a:b0:183:6555:7a89 with SMTP id e10-20020a170903240a00b0018365557a89mr16044100plo.68.1667250377749; Mon, 31 Oct 2022 14:06:17 -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 s67-20020a625e46000000b00560cdb3784bsm5045142pfb.60.2022.10.31.14.06.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 14:06:16 -0700 (PDT) Content-Language: en-US In-Reply-To: <835yfzeobt.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:246724 Archived-At: On 10/31/2022 1:21 PM, Eli Zaretskii wrote: >> Date: Mon, 31 Oct 2022 13:01:55 -0700 >> Cc: 58909@debbugs.gnu.org >> From: Jim Porter >> >> 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. > > Yes, this new behavior can be worked around, in more than one way. > But people get annoyed by changes which invalidate their muscle memory > of many years. So we must in each case like this to have a very good > reason for such changes, otherwise people would rightfully conclude > that our decisions are more-or-less are arbitrary and basically prefer > someone's workflows over those of others. I can definitely understand that position. It's an aspect of Emacs that I know I appreciate very much. Emacs has been around for a long time, and hopefully will be around for a lot longer. I'm not sure I have a great sense of how to balance Emacs' history with ensuring that the next decade (and more!) of Emacs is on the best footing possible. In any case, unless my other recent messages have convinced you otherwise, what do you think of the following: 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). 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.