From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Sergey Organov <sorganov@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Graceful Gnus exit on Emacs exit
Date: Tue, 21 Apr 2020 11:55:20 -0700 [thread overview]
Message-ID: <87mu741xev.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87pnc0vfq2.fsf@osv.gnss.ru> (Sergey Organov's message of "Tue, 21 Apr 2020 21:47:01 +0300")
Sergey Organov <sorganov@gmail.com> 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 :)
The non-complex version would be:
(add-hook 'hill-emacs-hook #'gnus-group-exit)
Though you'd have to deal with the prompts.
No, I don't think there's a better way.
next prev parent reply other threads:[~2020-04-21 18:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 18:47 Graceful Gnus exit on Emacs exit Sergey Organov
2020-04-21 18:55 ` Eric Abrahamsen [this message]
2020-04-21 20:48 ` Sergey Organov
2020-04-22 5:13 ` Colin Baxter
2020-04-22 7:52 ` Sergey Organov
2020-04-22 11:13 ` Colin Baxter
2020-04-22 17:38 ` Bob Newell
2020-04-22 18:06 ` Eric Abrahamsen
2020-04-22 22:12 ` Sergey Organov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mu741xev.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=help-gnu-emacs@gnu.org \
--cc=sorganov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).