all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Graceful Gnus exit on Emacs exit
Date: Tue, 21 Apr 2020 21:47:01 +0300	[thread overview]
Message-ID: <87pnc0vfq2.fsf@osv.gnss.ru> (raw)

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



             reply	other threads:[~2020-04-21 18:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 18:47 Sergey Organov [this message]
2020-04-21 18:55 ` Graceful Gnus exit on Emacs exit Eric Abrahamsen
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pnc0vfq2.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.