From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: chad Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame Date: Sun, 7 Nov 2021 21:13:36 -0800 Message-ID: References: <2d6e9fbc4790b19f4e3c@heytings.org> <90ba36dccc58c0fab37a@heytings.org> <90ba36dccc7a3f8c91e2@heytings.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000e8fbe05d0400fd9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2792"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jim Porter , EMACS development team To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 08 06:23:24 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 1mjx7r-0000YK-NX for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Nov 2021 06:23:23 +0100 Original-Received: from localhost ([::1]:38492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjx7q-0005mu-LX for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Nov 2021 00:23:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjx6S-0004zi-0I for emacs-devel@gnu.org; Mon, 08 Nov 2021 00:21:57 -0500 Original-Received: from [2a00:1450:4864:20::534] (port=40653 helo=mail-ed1-x534.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjx6O-0005RZ-Vy for emacs-devel@gnu.org; Mon, 08 Nov 2021 00:21:54 -0500 Original-Received: by mail-ed1-x534.google.com with SMTP id b15so38261082edd.7 for ; Sun, 07 Nov 2021 21:21:50 -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 :cc; bh=iQQEpqr7r5KZMOH2Zw2IfGe0biNyC+lUgtpsDLjb3jI=; b=ldTi5lz7YtiycMaPZtj3JYbmlwt4ihgEMfQNniuCvxWEhJIs0gI4ep5HkqrMXQazJs y5UVugmaiTNJ+hXZCQsjAptyCJJdPFVaRMGgnwgxMFzRM5dc5/8GYogEGo6DDRbCq5hw u97tSAtROp3uiaDGJNOClzyTjBoYzAI+vEMLTm/quT3ok5wLdlcSq0HITenX7IF3Hj5J 7Dnho0dVfuHDVhopzqfXpAtrk2CbIgGxZabWb2CemCV1ndPva9aSwsOYXHOoeLLHy1Yj 5F2nJ8WlWB6GEld2t4FU9MG0L5nuLsdfssp4IMV71Lt8CzOjKblZinWBZz3x35LnIKp0 rtsw== 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:cc; bh=iQQEpqr7r5KZMOH2Zw2IfGe0biNyC+lUgtpsDLjb3jI=; b=WmSopnXvmrmZfVLqi8jpv8XRazZRFhtUC9cYetdeIMibIyN+zrzXTAH2+XmDmuSmTe K7Z4Xy4KZvNEGjjv/SlBYZTun+Z9zygWLLoX36q2NwZ00rjN1IdihTQyTXuiKMcNDfIV TKyw7OsI/MDKyC2SFQO0AvZUA4heKEQg4xAg2B31bIwxCG7S8z/pR7sBWZZ02imjZkQ7 Vn+R2buxX0FCZ3+zqSOJUxg3RD6OJ9nt/+OJoEsj/WGUqeahkyvz3ShL5U3sJ6heZFD6 utkr1VPoChQFzLixbddFm8hdmpTPs0zzIXmpppfMCbE9DzH33YLKrwdhIRcTCAqRtuXZ 60lw== X-Gm-Message-State: AOAM5303lp1xPHYg6Jvh4W8p0p8gqbb66xyGXq7672MEG7hv49/HgRK+ /iA9bWGTRi/serawbCIwEQDZ/ULtCWQGxexDSeeshFX/ X-Google-Smtp-Source: ABdhPJypcyv4h5HuPTLpsZzF376tZ/cmUghnK1B0Vv12trtZ9Jyb70VRz7/OQJUoY0LjfInsX2uzpfbvKBpGlFxQY58= X-Received: by 2002:a19:ca10:: with SMTP id a16mr19010762lfg.96.1636348432649; Sun, 07 Nov 2021 21:13:52 -0800 (PST) In-Reply-To: <90ba36dccc7a3f8c91e2@heytings.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::534 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=yandros@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:279016 Archived-At: --0000000000000e8fbe05d0400fd9 Content-Type: text/plain; charset="UTF-8" On Sun, Oct 24, 2021 at 8:18 AM Gregory Heytings wrote: > > > > > Even better (because it also works with emacsclient -n): > > > > (when (daemonp) (run-with-timer 2 2 (lambda () (when (<= (length > (frame-list)) 1) (save-buffers-kill-emacs))))) > > > > Slightly improved and submitted in bug#51377. > Apologies for the thread necromancy; I was away for a long while. While catching up, I wondered if there was an appropriate hook to use, rather than a timer. I think that delete-frame-functions may DTRT, but it depends a bit on the use case. Hope that helps, ~Chad --0000000000000e8fbe05d0400fd9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable --0000000000000e8fbe05d0400fd9--