From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Suvayu Ali Newsgroups: gmane.emacs.help Subject: Re: Understanding the behaviour of Emacs and Emacs Client Date: Tue, 1 Mar 2022 16:54:35 +0000 Message-ID: References: <87ley2b70o.fsf@codeisgreat.org> <837d9lu5th.fsf@gnu.org> <87czj7wtx3.fsf@codeisgreat.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19668"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 01 19:07:50 2022 Return-path: Envelope-to: geh-help-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 1nP6ub-0004xd-P1 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Mar 2022 19:07:49 +0100 Original-Received: from localhost ([::1]:47102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nP6ua-0000Vg-Pb for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 01 Mar 2022 13:07:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nP5rB-0006Tp-H4 for help-gnu-emacs@gnu.org; Tue, 01 Mar 2022 12:00:14 -0500 Original-Received: from [2607:f8b0:4864:20::a33] (port=36767 helo=mail-vk1-xa33.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nP5r9-0001di-UL for help-gnu-emacs@gnu.org; Tue, 01 Mar 2022 12:00:13 -0500 Original-Received: by mail-vk1-xa33.google.com with SMTP id w128so7192020vkd.3 for ; Tue, 01 Mar 2022 09:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6nyZ5paHj6UWBPj8uk6UK72TJmmERcJNtS6U9gSFwTw=; b=IffxHHZAQJwqgf0jOeqkE7nKJ2J+noS0xSGk2gABKIyq0F4IyEg0wGumdrGOUuaybm zGReAWj47E6hOjisSKnlRFvj1QxMFSjvhfnly/YobNrS3FUbpZvfwhMOwT0tx6/TKCQw tJA589eEllQuYS/7zQbDqAJYekUiFshW3MT1vy2hExuSuAyovom1zPUOJee5OnP58v0j bA7z/fieLGJnB6mU81lG5185HFX4e430f5bkorBF1pWfSdBMLxJetpOnZ4GAv2j59Nbp 0fUhCw2QNIz7ylf97yY7jnLAJE8fIMM8P7kV0bZaF0v+6/BMpBg5CxfKPVOw3HaD16AD kRkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=6nyZ5paHj6UWBPj8uk6UK72TJmmERcJNtS6U9gSFwTw=; b=KqM70UOiLS9Ia5QL6w4EVVNufEcJRrq7UsOoYez20VKO2BJxeZdnrc4sNCbCniTqdJ 5+81zLabtRxSBTZ76MMB40CfN42Y5MW8Vh94A41WWH+g17BMDhULCStOLSLO0vnsnM8u stUG0JtfU5JbTLRjguPRZtcMAiBuZtU3ZF6dkrcl3VO0qZfyNyQk5TJRtepDYIoW+lKm 4apFIsxnFD2yLzm+9G1JatPr6sg3vjY4eoND+EC41yyxNzaiU+N2BYnThPUU7xFR7hj4 vDKTOZQj1BIY6hnAGqw2U/zNCesTNbZeKWCCZyPTj0GpRKRXmNEKWgOHz7BxsYprW3wM /t8w== X-Gm-Message-State: AOAM531R1E1lpZ6n2PnIjzv4dnQelOKFtyg69JfIpXmZTcrj9fZySxvf uXlEG7UpxoR/8sfaeauGqU0tMhB4qOkDIN1ReOxL3GcFFEHH6kXv X-Google-Smtp-Source: ABdhPJzY+Y2Lr2tobxsmz04K37zmyWrI15hkwNOm7Ga3fqpHkVmSi4daFAw9JYD4KxpWEozKEAxe6s74X2KvChKXFT4= X-Received: by 2002:a67:f50b:0:b0:31b:ba72:8558 with SMTP id u11-20020a67f50b000000b0031bba728558mr11963062vsn.81.1646153686753; Tue, 01 Mar 2022 08:54:46 -0800 (PST) In-Reply-To: <87czj7wtx3.fsf@codeisgreat.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::a33 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::a33; envelope-from=fatkasuvayu@gmail.com; helo=mail-vk1-xa33.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 01 Mar 2022 13:04:56 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:136322 Archived-At: On Mon, Feb 28, 2022 at 3:29 AM Pankaj Jangid wrote: > > Eli Zaretskii writes: > > >> And if Yes then what is the official way to terminate the residual > >> Emacs process in case (2) above? > > > > The official way is to type "M-x kill-emacs RET". (But in general, if > > you use the "client" icon, the assumption is that you don't want to do > > that. rather, leave the Emacs process running and use the client icon > > to open a new frame next time you want to do something in Emacs -- > > this way, you keep all the history and the buffers inside the > > session, and the startup will be faster.) > > Thanks for the explanation, Eli. The only time I would want to do that > is when I am shutting down or rebooting the system for some reason. I > want to cleanly exit and save all work. "M-x kill-emacs RET" certainly > helps. > > Customization var like "kill-emacs-with-last-frame" could be a good > idea. Or "C-x C-c" on last frame may be used to default to this > behaviour; this will prevent any lost work due to reboot or > shutdown. Because the daemon is invisible after last frame. Just an > idea. "C-x 5 0" remains the same. I use the following: emacsclient --eval "(save-some-buffers t)" --eval "(kill-emacs)" -- Suvayu Open source is the future. It sets us free.