From: James Thomas <jimjoe@gmx.net>
To: Divya Ranjan <divya@subvertising.org>
Cc: ding@gnus.org
Subject: Re: Agent and IMAP
Date: Mon, 04 Nov 2024 06:16:26 +0530 [thread overview]
Message-ID: <86ses7esgt.fsf@gmx.net> (raw)
In-Reply-To: <865xpx5zi0.fsf@gmx.net> (James Thomas's message of "Sat, 12 Oct 2024 17:01:19 +0530")
James Thomas wrote:
> (defun my/gnus-demon-scan-mail ()
> (gnus-agent-while-plugged
> ;; Only level 3 servers should be agentized, for this.
> (gnus-agent-synchronize-flags)
> ;; Inbox.
> (gnus-group-get-new-news 3 t)
> (with-temp-message ""
> ;; Spam.
> (gnus-group-get-new-news 4 t)
> (gnus-agent-fetch-session))
> (unless (equal (current-message) gnus-no-groups-message)
> ;; Custom alert function.
> (alert))
> (call-interactively #'gnus-group-list-groups)))
Actually, this is the function I used to use:
--8<---------------cut here---------------start------------->8---
(defun my/gnus-demon-scan-mail ()
(gnus-agent-while-plugged
;; Get marked.
(gnus-agent-fetch-session)
(gnus-agent-possibly-synchronize-flags)
(gnus-group-get-new-news 4 t)
(with-temp-message ""
;; Get new headers.
(gnus-agent-fetch-session))
(unless (equal (current-message)
gnus-no-groups-message)
(alert))))
--8<---------------cut here---------------end--------------->8---
I'd removed some stuff that I (wrongly) thought unnecessary. Also, these
are in my .gnus.el:
(setq gnus-agent-synchronize-flags t)
(setq gnus-agent-go-online t)
And the default (info "(gnus) Agent Categories") was changed from
'short' to 'false'.
Just FYI.
Regards,
James
prev parent reply other threads:[~2024-11-04 0:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 22:23 Divya Ranjan
2024-10-11 22:44 ` Greg Troxel
2024-10-11 23:07 ` Divya Ranjan
2024-10-11 23:36 ` Greg Troxel
2024-10-12 3:49 ` Divya Ranjan
2024-10-12 8:59 ` Adam Sjøgren
2024-10-12 13:21 ` Divya Ranjan
2024-10-12 13:08 ` Greg Troxel
2024-10-12 13:21 ` Divya Ranjan
2024-10-11 23:55 ` James Thomas
2024-10-12 3:57 ` Divya Ranjan
2024-10-12 11:31 ` James Thomas
2024-11-04 0:46 ` James Thomas [this message]
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=86ses7esgt.fsf@gmx.net \
--to=jimjoe@gmx.net \
--cc=ding@gnus.org \
--cc=divya@subvertising.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.
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).