From: Nicolas Cavigneaux <cavigneaux@gmail.com>
To: info-gnus-english@gnu.org
Subject: Re: Expiring nnimap messages automatically
Date: Wed, 08 Apr 2020 10:38:18 +0200 [thread overview]
Message-ID: <m2mu7mid8l.fsf@gmail.com> (raw)
In-Reply-To: <87zhbmiqs4.fsf@ericabrahamsen.net>
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> Whoa hang on, why did explicitly asking for the 'expiry-wait parameter
> return nil before, then? Can you test that again? If 'expiry-wait is
> present in the alist, we should have gotten 2 from the earlier call.
Ok my bad, sorry. You were right I did a typo in the first call so here
are the actual values:
(gnus-group-find-parameter "nnimap+home:INBOX" 'expiry-wait)
2 (#o2, #x2, ?\C-b)
(gnus-group-find-parameter "nnimap+home:INBOX")
((display . all) (expiry-wait . 2) (gnus-use-scoring nil) (permanent-flags %Answered %Flagged %Draft %Deleted %Seen $Forwarded $Junk $NotJunk $NotPhishing $Phishing Forwarded ...) (active 1 . 95606) (uidvalidity . "2") (modseq . "7813712"))
Much more consistent :)
> Anyway, something is setting this parameter to two days, so I'm guessing
> that your imap messages are getting expired, but not until two days
> later, so it might look like nothing is happening. Is that possible?
If I check the nnimap+work:INBOX group I do only have emails that are
at most two days old, so it seems you're right.
To be sure it's working as expected I did:
(gnus-group-set-parameter "nnimap+home:INBOX" 'expiry-wait 1)
then enter the nnimap+home:INBOX group, exit it and enter it again.
Expired emails older than one day were gone (moved to Trash). Hooray!
> Have you configured the `gnus-parameters' option? Or set an
> `expiry-wait' parameter for this group in particular? Two days isn't a
> default value anywhere...
I didn't set gnus-parameters. It's value is nil.
I can't remember having explicitly set `expiry-wait` to two so I started
a new instance of Emacs and checked. The value is still 2. I checked my
whole config file for an hard-coded 2 value and nothing. Weird.
To gather more info I also checked other groups:
(gnus-group-find-parameter "nnimap+work:INBOX" 'expiry-wait)
nil
nnimap+home:INBOX is *the only one* with a value for expiry-wait. I
don't understand why so I'll paste configuration regarding expiry again
so you can double check:
(setq gnus-secondary-select-methods
'((nnimap "home"
(nnimap-address "imap.gmail.com")
(nnimap-server-port "imaps")
(nnimap-stream ssl)
(nnir-search-engine imap)
;; @see http://www.gnu.org/software/emacs/manual/html_node/gnus/Expiring-Mail.html
;; press 'E' to expire email
(nnmail-expiry-target "nnimap+home:[Gmail]/Trash")
(nnmail-expiry-wait 'immediate))
(nnimap "work"
(nnimap-address "imap.gmail.com")
(nnimap-server-port "imaps")
(nnimap-stream ssl)
(nnir-search-engine imap)
(nnmail-expiry-target "nnimap+work:[Gmail]/Trash")
(nnmail-expiry-wait 'immediate))))
My full Emacs config can be found at
https://github.com/Bounga/emacs-config but it's quite long. All config
related to Gnus is in gnus.el.
So there are two questions left:
- Why does nnimap+home:INBOX has a value of 2 rather than immediate or nil?
- How to apply expiry-wait on all nnimap groups?
Thanks again for your help Eric, I really appreciate.
--
Nicolas Cavigneaux
http://www.bounga.org
http://www.cavigneaux.net
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
next prev parent reply other threads:[~2020-04-08 8:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 8:42 Nicolas Cavigneaux
2020-04-07 17:13 ` Eric Abrahamsen
2020-04-07 18:24 ` Nicolas Cavigneaux
2020-04-07 19:49 ` Eric Abrahamsen
2020-04-07 20:22 ` Nicolas Cavigneaux
2020-04-07 21:29 ` Eric Abrahamsen
2020-04-07 22:32 ` Nicolas Cavigneaux
2020-04-08 3:45 ` Eric Abrahamsen
2020-04-08 8:38 ` Nicolas Cavigneaux [this message]
2020-04-08 14:55 ` Eric Abrahamsen
2020-04-09 8:22 ` Nicolas Cavigneaux
2020-04-09 16:47 ` Eric Abrahamsen
2020-04-09 19:26 ` Nicolas Cavigneaux
2020-04-09 20:23 ` Eric Abrahamsen
2020-04-09 20:27 ` Eric Abrahamsen
2020-04-09 21:15 ` Nicolas Cavigneaux
2020-04-09 21:32 ` Eric Abrahamsen
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=m2mu7mid8l.fsf@gmail.com \
--to=cavigneaux@gmail.com \
--cc=info-gnus-english@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.
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).