all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Graceful Gnus exit on Emacs exit
Date: Tue, 21 Apr 2020 23:48:02 +0300	[thread overview]
Message-ID: <87lfmoo9a5.fsf@osv.gnss.ru> (raw)
In-Reply-To: <87mu741xev.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Tue, 21 Apr 2020 11:55:20 -0700")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> 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 :)

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



  reply	other threads:[~2020-04-21 20:48 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
2020-04-21 20:48   ` Sergey Organov [this message]
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=87lfmoo9a5.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=eric@ericabrahamsen.net \
    --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.