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: Re: Graceful Gnus exit on Emacs exit Date: Tue, 21 Apr 2020 23:48:02 +0300 Message-ID: <87lfmoo9a5.fsf@osv.gnss.ru> References: <87pnc0vfq2.fsf@osv.gnss.ru> <87mu741xev.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="37406"; 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 To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 21 22:48:31 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 1jQzol-0009cb-5u for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 22:48:31 +0200 Original-Received: from localhost ([::1]:35996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQzok-0007Z4-8c for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 21 Apr 2020 16:48:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39378) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQzoN-0007Yr-5o for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 16:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQzoM-0001A9-EF for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 16:48:06 -0400 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:32803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jQzoL-000181-W6 for help-gnu-emacs@gnu.org; Tue, 21 Apr 2020 16:48:06 -0400 Original-Received: by mail-lf1-x12c.google.com with SMTP id h6so12268406lfc.0 for ; Tue, 21 Apr 2020 13:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Bimk8mhDojOa+3HwI5VdjDYotcikPD8CsvPgtelsSXM=; b=SYUBJtcNg2f5J3CmBhv+GliFJ/+1BIeAC1KE3c48KKbJNQoe6qRIFNd7TCtLJJojrk C7QOPlFK1MUSc4ivru9glJxmzlUGsBwrPuAVqTn29Ol18liHwG94W1YJBXc8X/14ds4t 8IOc6FDw2auaWunwT3kRWHNzW6L/Bnn+vAKf5kE0Bhfk9PGz0PHLjM20tjJIvLrML3OI LY95CqAzcNmtqaiLlmSScjH4EDOYAmdv8uKZ1/XjG62d/9j+w0s77LWvqJW2JDPoqD76 dOgqiySspka4Gv9okFhWzN1J8HjhA8Z2za3/mwFGvmCKUiB2IVPepK8EXzGXFe6aZFh1 ZpmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Bimk8mhDojOa+3HwI5VdjDYotcikPD8CsvPgtelsSXM=; b=uClmSNvSnx4G8bdbjeIadnbkfkgcy9jcfy5Ru+HL2zVkIMt8Yd8vP8bS1D7AUPTHDj J7fvpOXbyObDDUsFKbfauncSWnxb9XkCeGCjV5VpN5qV2BlGm3aOpvqIGLZ+pVeljvtc KBqvBMZTkKkqolFpF1wE6vjihDSdgFAJ8FkfqAgkkYx4cP3lsqrfUkiDZcAbQrqDel4d ADlQ9sqvqCa8WaFYR+vcCVLg9+UnIss6UQSNfyC4jT99eYk7PSWzBIb+0eooLP06m/qp yI9SEbimpI6ITSRIILcgOQ+P5XjlfT9qrwSevsjp48hE8JS7dJvsW6zOYQQUJH408vsB Sfwg== X-Gm-Message-State: AGi0PubSBehQcmz262etcTGFohWci4wTvPy6S1EnuZI1/eRh+5W8QVpi Ftrdk0WMigxxmBE32lqjRioobWR9 X-Google-Smtp-Source: APiQypJxiKLcNQ058YpfMEqwT55diGgLYItgrlE5B0ttsYfehawXFQTjObUZG6+LindOdkJUQYCBWg== X-Received: by 2002:ac2:5e65:: with SMTP id a5mr14770714lfr.189.1587502083475; Tue, 21 Apr 2020 13:48:03 -0700 (PDT) Original-Received: from osv.localdomain ([89.175.180.246]) by smtp.gmail.com with ESMTPSA id j13sm2873984lfb.19.2020.04.21.13.48.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 13:48:02 -0700 (PDT) In-Reply-To: <87mu741xev.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 21 Apr 2020 11:55:20 -0700") Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=sorganov@gmail.com; helo=mail-lf1-x12c.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::12c 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:122914 Archived-At: Eric Abrahamsen writes: > Sergey Organov writes: > >> 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? > > I wouldn't actually consider that to be very complex! At least not > compared to the elisp customizations I end up writing :) I just hoped for a "Graceful shutdown on Emacs exit" somewhere among million Gnus knobs. > > The non-complex version would be: > > (add-hook 'hill-emacs-hook #'gnus-group-exit) Yeah, that's what I thought as well. > > Though you'd have to deal with the prompts. ... and that's where the actual journey started! > > No, I don't think there's a better way. Sigh... Thanks! -- Sergey