[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graceful Gnus exit on Emacs exit
From: |
Sergey Organov |
Subject: |
Re: Graceful Gnus exit on Emacs exit |
Date: |
Tue, 21 Apr 2020 23:48:02 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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