From: "Björn Bidar" <bjorn.bidar@thaodan.de>
To: Dilip <idlip@protonmail.com>
Cc: ding@gnus.org
Subject: Re: How to maintain newsrc.eld clean and tidy
Date: Mon, 28 Oct 2024 15:20:25 +0200 [thread overview]
Message-ID: <87jzdstld2.fsf@> (raw)
In-Reply-To: <87h68yksw1.fsf@protonmail.com> (Dilip's message of "Sun,27 Oct 2024 11:08:06 +0530")
Dilip <idlip@protonmail.com> writes:
>> Personally I just have a Gnus demon timer to save newsrc, sync with
>> Nextcloud and the close whenever I'm done on that machine.
> It has become an habit to hit 's' to save after I read, Just like 'C-x
> C-s'
> I will also try to make demon timer.
Here's what I do:
(defun gnus-demon-scan-news-2 ()
(when gnus-plugged
(let ((win (current-window-configuration))
(gnus-read-active-file nil)
(gnus-check-new-newsgroups nil)
(gnus-verbose 2)
(gnus-verbose-backends 5))
(unwind-protect
(save-window-excursion
(when (gnus-alive-p)
(with-current-buffer gnus-group-buffer
(gnus-group-get-new-news gnus-activate-level))))
(set-window-configuration win)))))
(defun save-gnus-newsrc ()
(if (and (fboundp 'gnus-group-exit)
(gnus-alive-p))
(with-current-buffer (get-buffer "*Group*")
(gnus-save-newsrc-file))))
(setopt gnus-demon-handlers '((gnus-demon-scan-mail 120 60)
(gnus-demon-close-connections nil 3)
(save-gnus-newsrc nil 1)
(gnus-demon-scan-news-2 60 nil)))
The rest of my config is here below:
https://github.com/Thaodan/emacs.d/blob/master/init.org
next prev parent reply other threads:[~2024-10-28 13:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 18:33 Dilip
2024-10-26 19:48 ` Bob Newell
2024-10-26 20:54 ` Björn Bidar
[not found] ` <4904.38762806065$1729976159@news.gmane.org>
2024-10-27 5:38 ` Dilip
2024-10-27 9:51 ` Andreas Schwab
[not found] ` <87plnlr95i.fsf@protonmail.com>
2024-10-27 13:43 ` Andreas Schwab
2024-10-28 13:20 ` Björn Bidar [this message]
2024-11-02 0:53 ` James Thomas
2024-11-03 7:56 ` Dilip
2024-10-28 14:41 Dilip
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=87jzdstld2.fsf@ \
--to=bjorn.bidar@thaodan.de \
--cc=ding@gnus.org \
--cc=idlip@protonmail.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 NNTP newsgroup(s).