From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Graceful Gnus exit on Emacs exit Date: Wed, 22 Apr 2020 11:06:35 -0700 Message-ID: <87imhrqtsk.fsf@ericabrahamsen.net> References: <87pnc0vfq2.fsf@osv.gnss.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="66696"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org, Sergey Organov To: Bob Newell Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 22 20:12:04 2020 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 1jRJqu-000HFq-PQ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 Apr 2020 20:12:04 +0200 Original-Received: from localhost ([::1]:55554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRJqt-0008C7-NM for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 Apr 2020 14:12:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45688) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRJln-0004Ep-V4 for help-gnu-emacs@gnu.org; Wed, 22 Apr 2020 14:06:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRJln-0002A0-6Z for help-gnu-emacs@gnu.org; Wed, 22 Apr 2020 14:06:47 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:46884 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jRJlm-0001xv-Oj for help-gnu-emacs@gnu.org; Wed, 22 Apr 2020 14:06:46 -0400 Original-Received: from localhost (97-113-59-211.tukw.qwest.net [97.113.59.211]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 5DD0DFA02A; Wed, 22 Apr 2020 18:06:37 +0000 (UTC) In-Reply-To: (Bob Newell's message of "Wed, 22 Apr 2020 07:38:40 -1000") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/22 14:06:39 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 52.70.2.18 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:122921 Archived-At: Bob Newell writes: >> (defun gnus-exit () >> "Exit gnus without confirmation and return 't" >> (let ((noninteractive 't) >> (gnus-expert-user 't) >> (gnus-interactive-exit 'quiet)) >> (gnus-group-exit) 't)) >> >> (add-hook 'kill-emacs-hook 'gnus-exit) > > If it's any consolation, I do what amounts to the exact same thing, > including avoiding the prompts. I've noticed one undesirable side > effect (and very likely it's just the rest of my setup causing it) ... > if I should happen to exit Gnus during my Emacs session, when I > terminate Emacs, Gnus starts up again just so it can shut down ! Ha! You could wrap it in a check to `gnus-alive-p' to avoid that...