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#51993: 29.0.50; [PATCH] Killing emacsclient terminal with `server-stop-automatically' doesn't prompt to save files Date: Tue, 23 Nov 2021 15:42:59 -0800 Message-ID: <60d6439a-d2be-cbb4-b979-312a35216758@gmail.com> References: <9e47c871-a2c3-d764-bec9-d87abf3efe83@gmail.com> <83pmqvti49.fsf@gnu.org> <890d44ded2b56811ceff@heytings.org> <64c7eb70-d941-9c98-4513-a2bdc44e7953@gmail.com> <890d44ded2fa8ff77ab2@heytings.org> <1623621b-d2a6-a68c-ac28-cdd371886b11@gmail.com> <890d44ded2c42fe531a1@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13234"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 51993@debbugs.gnu.org To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 24 00:44:23 2021 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 1mpfSY-0003GW-So for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Nov 2021 00:44:22 +0100 Original-Received: from localhost ([::1]:50158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpfSX-0001Od-0Z for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Nov 2021 18:44:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpfSE-0001NL-Ty for bug-gnu-emacs@gnu.org; Tue, 23 Nov 2021 18:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpfSE-0001Tn-MG for bug-gnu-emacs@gnu.org; Tue, 23 Nov 2021 18:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpfSE-00020Q-Gg for bug-gnu-emacs@gnu.org; Tue, 23 Nov 2021 18:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Nov 2021 23:44:02 +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.16377109927635 (code B ref 51993); Tue, 23 Nov 2021 23:44:02 +0000 Original-Received: (at 51993) by debbugs.gnu.org; 23 Nov 2021 23:43:12 +0000 Original-Received: from localhost ([127.0.0.1]:52486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpfRP-0001z3-Gk for submit@debbugs.gnu.org; Tue, 23 Nov 2021 18:43:11 -0500 Original-Received: from mail-pl1-f182.google.com ([209.85.214.182]:34710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpfRK-0001yZ-K5 for 51993@debbugs.gnu.org; Tue, 23 Nov 2021 18:43:10 -0500 Original-Received: by mail-pl1-f182.google.com with SMTP id y8so379069plg.1 for <51993@debbugs.gnu.org>; Tue, 23 Nov 2021 15:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=rrbgTcy2IYLhsGr+wKvPJOxDfopj96nUkWYjIPbu0WY=; b=QDWF1uNtewAhydTXa8JzL5dEk1pUlgUIXYk2aO3EE9/CUh6no4Lo0H6c735nz98N+t zSqKf/1sQDCia/sbOYMamdIMiOx04P0cDYUnIrvyinfVptEyU3N4uER0IsN1btiSINxZ 2MG/+NXOPwVb+ZdFPTeSfFC9ouu29qkLsKsAwnmAXicdwLWCmZUMBWNSLg1Fn9mxxw81 yZqjS3ZNbWtrux9Q2dxZ6jp3TLm3NcurIXjl21aAd36nusIa9HFYXfufruNbsFJapbsr /JIGWXxECmzH7azxMxfGN46v6V/iB7fyy4gxxzlgmddk364u2kTLITgCK4rdY3zxZBO7 SgdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rrbgTcy2IYLhsGr+wKvPJOxDfopj96nUkWYjIPbu0WY=; b=QRoVQDOkX7mnsKYMZUZO86Ds9iY47XYL2za6+QR7NG5qgt5EPKp3JH+y0WA2DOoMEW iP49zu0FQuveyMzbTiKAWHl1HrB0ZQoYC050OpHleBPpHtP9s6mYSQFCdXgcS5qs2WfY Ku7ZNyhlxRvIEZRrk7nm8bVjZ8GHDQehgBjwcnXkcinI2q7dBxWM/o/7GcJCpoFrS9Ii EcmV8yqsCuukRMdtQZ54EcoYXsiWg0sxFm8uBYe87ROh+fX6wcW7P2dBD9jqocxBoKXU PY8eNrT/xluC1SNmaJ99ZHEGNzjX+n+0+tOA08g+fce56/3A+tBs+gD5UvGvHrQ6A6kB buQg== X-Gm-Message-State: AOAM530zBxSTOqBqW0wBfJNT1Ql77T9Egnd98xAxSt610XP0geqPofJy ex5VkvkZyzTaOfmOHaRexy0= X-Google-Smtp-Source: ABdhPJy4kii9aRP+VcOMA4KgXk9IU6Gr0EduJtFSram0hE9A+I1kHokg+EWTFcNaKFQjNZGbOpd2XQ== X-Received: by 2002:a17:902:7616:b0:143:a8cd:ef0 with SMTP id k22-20020a170902761600b00143a8cd0ef0mr12323600pll.48.1637710980721; Tue, 23 Nov 2021 15:43:00 -0800 (PST) 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 t3sm7661440pfg.94.2021.11.23.15.42.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Nov 2021 15:43:00 -0800 (PST) In-Reply-To: <890d44ded2c42fe531a1@heytings.org> Content-Language: en-US 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220693 Archived-At: Eli, Lars: I'm not sure what either of you would like to do about this bug, but it seems that most of the conflict is due to a miscommunication between me and Gregory (that's my impression, anyway). I hope my previous messages have explained my thoughts on the matter fairly thoroughly (if not, just let me know). However, I'm not sure there's much more I can add to the discussion beyond this message. On 11/23/2021 2:49 PM, Gregory Heytings wrote: > As I said earlier, the problem you described in this bug report was not > a bug, at least in the sense that it was not something that was not > explicitly intended by the one who wrote the code (and documented).  And > the behavior you wanted is handled by the patch I sent, without removing > any of the other existing behaviors.  But now you apparently want > something else again. I've only wanted one behavior since I started this discussion on Oct 19[1]. However, rather than making sure we understand each other's descriptions (or consulting the patches I've posted throughout the discussion) and have properly identified the corner cases to handle, you've instead implemented the behavior "for" me, even though I said from the beginning that I was looking to write the patch myself. I never posted a rigorous specification of the behavior I wanted for that reason: I was soliciting feedback to develop a patch that meets my needs (along with the needs of anyone who spoke up at the time, if possible). The fact that you opted to help by authoring your own patches is appreciated, but it ultimately doesn't help me because we seem to be talking at cross purposes and your impressions of what I want aren't what I actually want. Moreover, if our interpretations *don't* match up and I bring up an issue with a proposed patch, that doesn't mean that I want an additional option or that I've changed my mind; it just means that we haven't reached an understanding yet. I certainly don't expect you to do any additional work here. I'm perfectly happy to provide patches implementing the behavior I have in mind, and to adjust them as needed if you or anyone else has feedback on them. While I could probably construct a rigorous specification for the behavior I want so that someone else (e.g. you) could implement it, that would probably end up just being a set of test cases extracted from the patch I already have. As an aside, I mentioned this previously, but I think it would be valuable to write some automated test cases to verify that things work as expected. However, I didn't see a way to test creating/destroying Emacs servers/clients via ERT. I'm certainly open to doing so if someone points me in the right direction though. >> I don't think that a user who opts in to stopping the Emacs daemon >> automatically is *also* opting in to changing the behavior of whether >> Emacs will prompt about saving files when killing a (non-last) client. >> Since there are other clients, the daemon won't be killed, and so the >> behavior should be identical to what happens without >> `server-stop-automatically'. As a user, I would find it very strange >> that enabling `server-stop-automatically' would change Emacs' behavior >> in ways *other than* stopping the server in certain cases. >> > > Yet this is what you're asking.  If you want Emacs to prompt you whether > the files should be saved and the process killed when you delete the > last frame, you want to change the way Emacs prompts about saving files > and killing processes, because this (namely prompting the user when the > last frame is deleted) isn't happening without server-stop-automatically. That's not relevant to the case I'm discussing above. I specifically said I'm talking about the behavior when killing the *non-last* client. In that case, the server won't be stopped, no matter how `server-stop-automatically' is configured. [1] https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg01465.html