From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii 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: Wed, 02 Nov 2022 21:23:15 +0200 Message-ID: <831qql9n4s.fsf@gnu.org> 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> <0dc07894-dfa1-01f6-87c4-9e02bfcaf0dc@gmail.com> <83bkppblh7.fsf@gnu.org> <83a6599t7m.fsf@gnu.org> <39e03350-2783-fa90-5d66-26e47abe100d@gmail.com> <835yfx9p0z.fsf@gnu.org> <3d5bc685-889f-f406-0979-10f61db5d1a7@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58909@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 02 20:24:56 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 1oqJM7-000AOs-SA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Nov 2022 20:24:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqJLR-0004Nu-T9; Wed, 02 Nov 2022 15:24:13 -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 1oqJLI-0004Kg-5y for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 15:24: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 1oqJLG-0001RC-0i for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 15:24:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqJLF-0001JS-J3 for bug-gnu-emacs@gnu.org; Wed, 02 Nov 2022 15:24:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Nov 2022 19:24: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.16674170135008 (code B ref 58909); Wed, 02 Nov 2022 19:24:01 +0000 Original-Received: (at 58909) by debbugs.gnu.org; 2 Nov 2022 19:23:33 +0000 Original-Received: from localhost ([127.0.0.1]:47210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqJKm-0001Ii-L1 for submit@debbugs.gnu.org; Wed, 02 Nov 2022 15:23:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqJKk-0001IT-7y for 58909@debbugs.gnu.org; Wed, 02 Nov 2022 15:23:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqJKe-0001QH-NL; Wed, 02 Nov 2022 15:23:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GoKU3CxUDtUOehc3CIcCzpqXs1Y2Vy+hdG4kE/NWVEQ=; b=E3oN/G+CZMZM gwUoYe42EobFQheBkFWcaQ079+W7DcG9X10hpvCYI31nvcQlTn/R6TH44YvCuGYFYXS4BMpExkjvW zh1I/bpEhFm1w22cvPcq5G4v4ue8g0Y3/3Am/5yjCb8OxSJNJrVVoCtMu1nulU7LfQZDbf8zeobsM 2P/qCvbEUuMynpZ4HslPxZrA2o2Kdl9+Qm/mzvwc1YEL2LqzYQcd9Fp0SEDgO50pJNXQHnP9EcN3M wMsuky5a/Z6EZu/n8EiYYOOkhb+UhCUU/OjaBjcKtyAI3y5QtUyq8N4baVn3ONN1xA7pWuLO3b64u GkzywJguOTlEU3ODw6sLlg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqJKe-0006bD-6c; Wed, 02 Nov 2022 15:23:24 -0400 In-Reply-To: <3d5bc685-889f-f406-0979-10f61db5d1a7@gmail.com> (message from Jim Porter on Wed, 2 Nov 2022 12:16:30 -0700) 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:246890 Archived-At: > Date: Wed, 2 Nov 2022 12:16:30 -0700 > Cc: 58909@debbugs.gnu.org > From: Jim Porter > > >> If you mean adding a defcustom, I thought we'd agreed not to do that > >> (see the beginning of your message here[1]). > > > > Yes, but you keep pushing... > > Sorry if I seem pushy. I really am open to different solutions here, and > I just want to present some various options I see to make it > possible/easy to adjust the behavior of server.el. My goal is really > just to offer what improvements I can to Emacs; if they don't belong, > that's ok. I can just use them locally. > > In short, consider my messages/patches as just an offer to help. Isn't the last suggestion, of having an optional prompt in server-delete-client, good enough? > > Why is it important to have the mode turned on? What can a mode do > > that we cannot do without a mode? > > If starting the server activates a minor mode, then Emacs can use a > minor-mode keymap for server-mode. That would make it easy for users to > add keybindings that only take effect when the server is running. In my > case, I could locally remap 'delete-frame' to some new function when the > server is running, and then I could make that function do exactly what I > want. Other users might want to add other keybindings to this keymap > (maybe one for 'server-edit-abort'). > > In fact, for my purposes, even just having daemon mode call > '(server-mode 1)' instead of '(server-start)' would be a good improvement. I'm fine with doing that, but we must also make sure this mode is turned on when users invoke server-start interactively.