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: Tue, 1 Nov 2022 15:39:29 -0700 Message-ID: <0dc07894-dfa1-01f6-87c4-9e02bfcaf0dc@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> <7694fcf2-8982-9099-5eb8-39835d049847@gmail.com> <83y1svch5u.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------Rbi4e1m0rLHYKzgxzaYbA2os" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19452"; 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@gnu.org Tue Nov 01 23:40:15 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 1opzvb-0004v3-Fs for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Nov 2022 23:40:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opzvR-0008UD-Es; Tue, 01 Nov 2022 18:40: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 1opzvP-0008Sv-2Z for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 18:40: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 1opzvO-0004PZ-QS for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 18:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opzvO-00061x-Lp for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 18:40: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: Tue, 01 Nov 2022 22:40: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.166734238023132 (code B ref 58909); Tue, 01 Nov 2022 22:40:02 +0000 Original-Received: (at 58909) by debbugs.gnu.org; 1 Nov 2022 22:39:40 +0000 Original-Received: from localhost ([127.0.0.1]:44404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opzv2-000612-6J for submit@debbugs.gnu.org; Tue, 01 Nov 2022 18:39:40 -0400 Original-Received: from mail-pj1-f48.google.com ([209.85.216.48]:55127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opzv0-00060i-Hv for 58909@debbugs.gnu.org; Tue, 01 Nov 2022 18:39:38 -0400 Original-Received: by mail-pj1-f48.google.com with SMTP id h14so14547599pjv.4 for <58909@debbugs.gnu.org>; Tue, 01 Nov 2022 15:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:references:cc:to:from:content-language:subject :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=evKgme73iBkIjVn+nCEu7uKELc/ETaLpi2Mxs6Wg7ng=; b=OmQr5PnGz4omaq3CdsRNHKixWMYSDQrZKU2u6cXi0N9PuRxwmr7kZSsBOTrwG6Pnio LbhQIJOMmbVl2FoSNsEHzNv9lAt3fiGmkmk+3OdHuCddrgLB9FYh9xa7Kje2awcI8QaS z3e2E30WUH/2HygT5qqBmcxPHihL8ed+ZD4cNSsb0iqpvNK6Pko9iBOkf6ZkGz8kVOCU /6sNBgNa9Eur1tnw6AuuLMenfJugerVnNsrV9hQcX2+CFIQR85LnR4XmqHBuZNIoUxl8 OVPcyq5d4C8bSCgC1Zzn/Ml1Z6ODqGLO7PPRgmgGoVAMC2Ehn7nl0MkSVrsFm93n1Eo+ I32g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:references:cc:to:from:content-language:subject :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=evKgme73iBkIjVn+nCEu7uKELc/ETaLpi2Mxs6Wg7ng=; b=fv1u908UvSenvOOvHMHHboX8pkILMZ8cxb1c2fOZDx94PISby/zIvJryoAPerR9mYB nW6gb/Jc3kJsQ2URMB6dWTjShRjtq5MDfTguixKHpgwAdRkE2s2wyES5LsoqxtPnxRyB 3I5eX0RIzQ9Ou+OFhRIZpFU+J76uQ4Sn9w+N8urVGI+fswMWv3KmENLv2ZwKE/vLWbRy lUq7xq8H1mQfgyPN0S6eTu6gyHFX2eqk6ymizdu27WeIyldxEkPcks3aF5xDK5UZqqku pWokpyXxlEU8WJazRdTUnzO7bJLgcNc7TpxXzPjBWWa4UfnUGRGvjsX0SOubm017ivze ll4w== X-Gm-Message-State: ACrzQf1BW68w0EgtEycovf+K77e3o59w4deTwAsUILEboPjOe77N/gdf OYveCJZ/aSq4NQCMEl8OtOY= X-Google-Smtp-Source: AMsMyM6/ukysvZ+eSH2mF1GfVoXKoNOW0veDUSeIqrDKRFOt7NX6XtuvhHpxG912OJnIlWEki7u8EA== X-Received: by 2002:a17:902:9a07:b0:178:8024:1393 with SMTP id v7-20020a1709029a0700b0017880241393mr21705300plp.128.1667342372428; Tue, 01 Nov 2022 15:39:32 -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 a19-20020aa79713000000b0056b3c863950sm7062897pfg.8.2022.11.01.15.39.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 15:39:31 -0700 (PDT) Content-Language: en-US In-Reply-To: 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:246817 Archived-At: This is a multi-part message in MIME format. --------------Rbi4e1m0rLHYKzgxzaYbA2os Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/1/2022 9:11 AM, Jim Porter wrote: > However, I'm not sure how to do this in a complete way without tweaking > 'delete-frame-functions'. ... Attached is a (hopefully) safer version of my change to 'delete-frame'. In this patch, a hook can only cancel frame deletion if FORCE is non-nil. This way, if there were ever some bug with a hook, you (or some code) can still force-delete the frame. This would probably still need a NEWS entry, but I'm personally less worried about this change compared to my previous revision. What do you think? --------------Rbi4e1m0rLHYKzgxzaYbA2os Content-Type: text/plain; charset=UTF-8; name="0001-Let-delete-frame-functions-quit-out-of-frame-deletio.patch" Content-Disposition: attachment; filename*0="0001-Let-delete-frame-functions-quit-out-of-frame-deletio.pa"; filename*1="tch" Content-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