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.devel Subject: Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame Date: Fri, 22 Oct 2021 09:41:46 +0300 Message-ID: <83o87h7e8l.fsf@gnu.org> References: <20211020063638.8963.5C4F47F8@xenu.pl> <0ce055f1-23dc-0927-1098-b9629f2ccfe3@gmail.com> <83h7daap1z.fsf@gnu.org> <331355ff-0b5b-2e6b-6abd-639c80d74a1b@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10776"; mail-complaints-to="usenet@ciao.gmane.io" Cc: me@xenu.pl, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 22 08:43:09 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mdoGj-0002Zs-06 for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Oct 2021 08:43:09 +0200 Original-Received: from localhost ([::1]:34272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdoGh-0006yW-Ap for ged-emacs-devel@m.gmane-mx.org; Fri, 22 Oct 2021 02:43:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdoFd-0006KA-87 for emacs-devel@gnu.org; Fri, 22 Oct 2021 02:42:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35984) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdoFc-0004Vm-RK; Fri, 22 Oct 2021 02:42:00 -0400 Original-Received: from [87.69.77.57] (port=4125 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 1mdoFc-0007RN-E2; Fri, 22 Oct 2021 02:42:00 -0400 In-Reply-To: <331355ff-0b5b-2e6b-6abd-639c80d74a1b@gmail.com> (message from Jim Porter on Thu, 21 Oct 2021 19:42:23 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277549 Archived-At: > Cc: me@xenu.pl, emacs-devel@gnu.org > From: Jim Porter > Date: Thu, 21 Oct 2021 19:42:23 -0700 > > I hope an example will illustrate what I mean[1]. I start with two > terminals open, A and B[2]. In terminal A, I run `emacs -nw foo.txt'. In > terminal B, I run `emacsclient -nw -c bar.txt'. Now, suppose I want to > stop editing foo.txt in terminal A and go back to doing something else. > I'd type `C-x C-c', but then my emacsclient in terminal B will close too. No, it should say the session has client, and ask for confirmation. You also have C-z to temporarily suspend the session on A. > However, using the daemon configuration with ALTERNATE_EDITOR="", I > could run `emacsclient -nw -c ...' in each terminal. Then when I type > `C-x C-c' in terminal A, it only kills that client, not the daemon > process. I can then continue to edit in terminal B without interruption. > > Of course, this isn't a bug, it's just how emacs and emacsclient work > together when not using `emacs --daemon'. It just turned out to be > inconvenient for how I use Emacs, so I've moved to using `emacs > --daemon' instead. Which is exactly why we provided the daemon mode, so I see no problem here, I see a solution for a particular class of use patterns.