From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Sergey Organov Newsgroups: gmane.emacs.help Subject: Graceful Gnus exit on Emacs exit Date: Tue, 21 Apr 2020 21:47:01 +0300 Message-ID: <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="27510"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 21 20:48:07 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 1jQxwF-000747-Jp for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 20:48:07 +0200 Original-Received: from localhost ([::1]:34408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQxwE-000639-Nt for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 14:48:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45728) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQxvJ-00062Q-4S for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:47:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQxvF-0008VW-GC for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:47:08 -0400 Original-Received: from mail.javad.com ([54.86.164.124]:50824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQxvF-0008Uq-39 for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 14:47:05 -0400 Original-Received: from osv (unknown [89.175.180.246]) by mail.javad.com (Postfix) with ESMTPSA id 9F4FC3E96E for ; Tue, 21 Apr 2020 18:47:03 +0000 (UTC) Authentication-Results: ip-172-31-2-110; spf=pass (sender IP is 89.175.180.246) smtp.mailfrom=sorganov@gmail.com smtp.helo=osv Received-SPF: pass (ip-172-31-2-110: connection is authenticated) Original-Received: from osv by osv with local (Exim 4.92) (envelope-from ) id 1jQxvB-00034K-OZ for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 21:47:01 +0300 Received-SPF: softfail client-ip=54.86.164.124; envelope-from=sorganov@gmail.com; helo=mail.javad.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/21 14:47:03 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 54.86.164.124 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:122911 Archived-At: Hello, Gnus v5.31 doesn't seem to install any hooks at Emacs exit that is unfortunate. After some digging I came up with the following code in my .gnus.el to gracefully exit Gnus on Emacs exit: (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) I worry why it ended up being that complex? Is there better way? Thanks, -- Sergey