Unnamed repository; edit this file 'description' to name the repository.
 help / color / Atom feed
* Expiring nnimap messages automatically
@ 2020-04-07  8:42 Nicolas Cavigneaux
  2020-04-07 17:13 ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-07  8:42 UTC (permalink / raw)
  To: info-gnus-english

Hello,

this is my first post in this newsgroup. I hope I'll follow this
newsgroup and general guidelines in my post.

I'm using Gnus for quite some times now and I really like it so far. I
managed to tweak it to my needs.

I mainly use it to read / write emails from multiple accounts but I also
use it to read newsgroups and newsfeeds.

I'm only one tweak away from my dream setup. I know how to manually
expire a given mail or thread. I did setup the nnmail-expiry-wait to
'immediate. As far as I know my setup is ready to auto-expire expired
mail in my nnimap groups but in fact expiry never happens.

When I leave a group, Gnus tells me that it is expiring my emails but
they never get deleted / moved. I can even call
gnus-summary-expire-articles and nothing happens.

The only way I found to really expire my expired mails (so they get
moved to according trash group) is to manually call
gnus-summary-expire-articles-now. This commands asks me for a
confirmation.

I though that the deletion / moving would be done automatically in some
way by Gnus…

Am I missing something? Is there something related to gnus-agent?

I'd be really grateful if someone was able to provide some insights to
help me with auto-deletion.

Here is the relevant part of config regarding expiry:

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

Thanks in advance and stay safe.
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07  8:42 Expiring nnimap messages automatically Nicolas Cavigneaux
@ 2020-04-07 17:13 ` Eric Abrahamsen
  2020-04-07 18:24   ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-07 17:13 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Hello,
>
> this is my first post in this newsgroup. I hope I'll follow this
> newsgroup and general guidelines in my post.
>
> I'm using Gnus for quite some times now and I really like it so far. I
> managed to tweak it to my needs.
>
> I mainly use it to read / write emails from multiple accounts but I also
> use it to read newsgroups and newsfeeds.
>
> I'm only one tweak away from my dream setup. I know how to manually
> expire a given mail or thread. I did setup the nnmail-expiry-wait to
> 'immediate. As far as I know my setup is ready to auto-expire expired
> mail in my nnimap groups but in fact expiry never happens.
>
> When I leave a group, Gnus tells me that it is expiring my emails but
> they never get deleted / moved. I can even call
> gnus-summary-expire-articles and nothing happens.
>
> The only way I found to really expire my expired mails (so they get
> moved to according trash group) is to manually call
> gnus-summary-expire-articles-now. This commands asks me for a
> confirmation.
>
> I though that the deletion / moving would be done automatically in some
> way by Gnus…
>
> Am I missing something? Is there something related to gnus-agent?
>
> I'd be really grateful if someone was able to provide some insights to
> help me with auto-deletion.
>
> Here is the relevant part of config regarding expiry:
>
> (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))))

I'm not entirely sure, but it looks like nnimap has its own server
variable governing expiration/expunging: ‘nnimap-expunge’

From the manual:

     When to expunge deleted messages.  If ‘never’, deleted articles are
     marked with the IMAP ‘\\Delete’ flag but not automatically
     expunged.  If ‘immediately’, deleted articles are immediately
     expunged (this requires the server to support the UID EXPUNGE
     command).  If ‘on-exit’, deleted articles are flagged, and all
     flagged articles are expunged when the group is closed.

     For backwards compatibility, this variable may also be set to t or
     nil.  If the server supports UID EXPUNGE, both t and nil are
     equivalent to ‘immediately’.  If the server does not support UID
     EXPUNGE nil is equivalent to ‘never’, while t will immediately
     expunge ALL articles that are currently flagged as deleted (i.e.,
     potentially not only the article that was just deleted).

Does that help?

Eric

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07 17:13 ` Eric Abrahamsen
@ 2020-04-07 18:24   ` Nicolas Cavigneaux
  2020-04-07 19:49     ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-07 18:24 UTC (permalink / raw)
  To: info-gnus-english


Hi Eric, thank a lot for your reply.

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I'm not entirely sure, but it looks like nnimap has its own server
> variable governing expiration/expunging: ‘nnimap-expunge’
>
> From the manual:
>
>      When to expunge deleted messages.  If ‘never’, deleted articles are
>      marked with the IMAP ‘\\Delete’ flag but not automatically
>      expunged.  If ‘immediately’, deleted articles are immediately
>      expunged (this requires the server to support the UID EXPUNGE
>      command).  If ‘on-exit’, deleted articles are flagged, and all
>      flagged articles are expunged when the group is closed.
>
>      For backwards compatibility, this variable may also be set to t or
>      nil.  If the server supports UID EXPUNGE, both t and nil are
>      equivalent to ‘immediately’.  If the server does not support UID
>      EXPUNGE nil is equivalent to ‘never’, while t will immediately
>      expunge ALL articles that are currently flagged as deleted (i.e.,
>      potentially not only the article that was just deleted).
>
> Does that help?

I just tried to set 'nnimap-expunge' to both 'on-exit and then
'immediate but it doesn't seems to do anything at all.

Every single doc or blog post I read about imap setting only talk about
'nnmail-expiry-wait' so I'm a bit confused. I don't think that everybody
missed the point and didn't realized that there mails were only hidden
not really deleted from the server (or moved to Trash).

I had some good hope when I saw your reply and this variable I didn't know
about :D but unfortunately it doesn't seems to be the answer.

Anyway than a lot for your time and help.
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07 18:24   ` Nicolas Cavigneaux
@ 2020-04-07 19:49     ` Eric Abrahamsen
  2020-04-07 20:22       ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-07 19:49 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Hi Eric, thank a lot for your reply.
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I'm not entirely sure, but it looks like nnimap has its own server
>> variable governing expiration/expunging: ‘nnimap-expunge’
>>
>> From the manual:
>>
>>      When to expunge deleted messages.  If ‘never’, deleted articles are
>>      marked with the IMAP ‘\\Delete’ flag but not automatically
>>      expunged.  If ‘immediately’, deleted articles are immediately
>>      expunged (this requires the server to support the UID EXPUNGE
>>      command).  If ‘on-exit’, deleted articles are flagged, and all
>>      flagged articles are expunged when the group is closed.
>>
>>      For backwards compatibility, this variable may also be set to t or
>>      nil.  If the server supports UID EXPUNGE, both t and nil are
>>      equivalent to ‘immediately’.  If the server does not support UID
>>      EXPUNGE nil is equivalent to ‘never’, while t will immediately
>>      expunge ALL articles that are currently flagged as deleted (i.e.,
>>      potentially not only the article that was just deleted).
>>
>> Does that help?
>
> I just tried to set 'nnimap-expunge' to both 'on-exit and then
> 'immediate but it doesn't seems to do anything at all.

Oops, I'm sorry, that variable only governs when/whether Gnus issues an
EXPUNGE command when exiting a group, nothing directly to do with
expiry, I should have looked at that more closely. I don't use expiry so
all this is a bit confusing.

The fact that expiry happens only when you call
`gnus-summary-expire-articles-now' makes it look like the
nnmail-expiry-wait is not getting successfully set to 'immediate. If you
run this (use whatever group name you're expecting expiry to happen in):

(gnus-group-find-parameter "nnimap+Home:INBOX" 'expiry-wait)

What does it return?

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07 19:49     ` Eric Abrahamsen
@ 2020-04-07 20:22       ` Nicolas Cavigneaux
  2020-04-07 21:29         ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-07 20:22 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> The fact that expiry happens only when you call
> `gnus-summary-expire-articles-now' makes it look like the
> nnmail-expiry-wait is not getting successfully set to 'immediate. If you
> run this (use whatever group name you're expecting expiry to happen in):
>
> (gnus-group-find-parameter "nnimap+Home:INBOX" 'expiry-wait)
>
> What does it return?

It returns nil so I guess it's not good?
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07 20:22       ` Nicolas Cavigneaux
@ 2020-04-07 21:29         ` Eric Abrahamsen
  2020-04-07 22:32           ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-07 21:29 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> The fact that expiry happens only when you call
>> `gnus-summary-expire-articles-now' makes it look like the
>> nnmail-expiry-wait is not getting successfully set to 'immediate. If you
>> run this (use whatever group name you're expecting expiry to happen in):
>>
>> (gnus-group-find-parameter "nnimap+Home:INBOX" 'expiry-wait)
>>
>> What does it return?
>
> It returns nil so I guess it's not good?

Yup, that would cause the problem. And you're sure that the group name
you're testing is a valid one, right? What do you get for just:

(gnus-group-find-parameter <group-name>)

?

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07 21:29         ` Eric Abrahamsen
@ 2020-04-07 22:32           ` Nicolas Cavigneaux
  2020-04-08  3:45             ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-07 22:32 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>> It returns nil so I guess it's not good?
>
> Yup, that would cause the problem. And you're sure that the group name
> you're testing is a valid one, right? What do you get for just:
>
> (gnus-group-find-parameter <group-name>)
>
> ?

Yes I think that the group name I'm using for my tests is a valid one. I
added a screenshot so you can see by yourself.

Evaluating:

(gnus-group-find-parameter "nnimap+home:INBOX")

returns:

((display . all) (expiry-wait . 2) (gnus-use-scoring nil)
(permanent-flags %Answered %Flagged %Draft %Deleted %Seen $Forwarded
$Junk $NotJunk $NotPhishing $Phishing Forwarded ...) (active 1 . 95605)
(uidvalidity . "2") (modseq . "7813361"))


[-- Attachment #2: Screenshot of Gnus groups --]
[-- Type: image/png, Size: 67280 bytes --]

[-- Attachment #3: Type: text/plain, Size: 71 bytes --]

-- 
Nicolas Cavigneaux
http://www.bounga.org
http://www.cavigneaux.net

[-- Attachment #4: Type: text/plain, Size: 162 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-07 22:32           ` Nicolas Cavigneaux
@ 2020-04-08  3:45             ` Eric Abrahamsen
  2020-04-08  8:38               ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-08  3:45 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>> It returns nil so I guess it's not good?
>>
>> Yup, that would cause the problem. And you're sure that the group name
>> you're testing is a valid one, right? What do you get for just:
>>
>> (gnus-group-find-parameter <group-name>)
>>
>> ?
>
> Yes I think that the group name I'm using for my tests is a valid one. I
> added a screenshot so you can see by yourself.
>
> Evaluating:
>
> (gnus-group-find-parameter "nnimap+home:INBOX")
>
> returns:
>
> ((display . all) (expiry-wait . 2)

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.

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?

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...

Eric

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-08  3:45             ` Eric Abrahamsen
@ 2020-04-08  8:38               ` Nicolas Cavigneaux
  2020-04-08 14:55                 ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-08  8:38 UTC (permalink / raw)
  To: info-gnus-english

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-08  8:38               ` Nicolas Cavigneaux
@ 2020-04-08 14:55                 ` Eric Abrahamsen
  2020-04-09  8:22                   ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-08 14:55 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

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

At least we're not crazy!

>> 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!

...and Gnus isn't crazy either!

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

Trying going into the *Groups* buffer, putting point on
"nnimap+home:INBOX", and hitting "G p" to edit the group parameters. You
should see the 'expiry-wait entry in there. How it got in there I
couldn't tell you, but Gnus saves group parameters along with marks in
your.newsrc.eld file, so that's why you weren't seeing it in your config
file.

Simply removing this entry should be enough to let your server parameter
take effect. Delete that and see if it works.

Eric

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-08 14:55                 ` Eric Abrahamsen
@ 2020-04-09  8:22                   ` Nicolas Cavigneaux
  2020-04-09 16:47                     ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-09  8:22 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Trying going into the *Groups* buffer, putting point on
> "nnimap+home:INBOX", and hitting "G p" to edit the group parameters. You
> should see the 'expiry-wait entry in there. How it got in there I
> couldn't tell you, but Gnus saves group parameters along with marks in
> your.newsrc.eld file, so that's why you weren't seeing it in your config
> file.

Oh! I didn't know that .newsrc.eld was storing these info. I learned
about "G p" too, pretty handy.

So I took a look and the 'expiry-wait was in there.

How do it got there? I played a lot with all kind of Gnus options and
commands when I started using it. I didn't know what I was doing but
wanted to discover Gnus features so I played with things I didn't
understand… Guess I played with 'expiry-wait on this group.

> Simply removing this entry should be enough to let your server parameter
> take effect. Delete that and see if it works.

I did remove it then "C-c C-c". I also hit "s" in groups buffer to save
my changes in .newsrc.eld.

I checked that the file was up-to-date and it is.

I started a new instance of Emacs / Gnus. The 'expiry-wait is really
gone when I check the group using "G p". But deleting / moving of
expired email is also gone with it… My expired messages now stay in the
group.

I could manually set 'expiry-wait on each group and it would do the job
but I'm pretty sure it's not the right way .
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-09  8:22                   ` Nicolas Cavigneaux
@ 2020-04-09 16:47                     ` Eric Abrahamsen
  2020-04-09 19:26                       ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-09 16:47 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Trying going into the *Groups* buffer, putting point on
>> "nnimap+home:INBOX", and hitting "G p" to edit the group parameters. You
>> should see the 'expiry-wait entry in there. How it got in there I
>> couldn't tell you, but Gnus saves group parameters along with marks in
>> your.newsrc.eld file, so that's why you weren't seeing it in your config
>> file.
>
> Oh! I didn't know that .newsrc.eld was storing these info. I learned
> about "G p" too, pretty handy.
>
> So I took a look and the 'expiry-wait was in there.
>
> How do it got there? I played a lot with all kind of Gnus options and
> commands when I started using it. I didn't know what I was doing but
> wanted to discover Gnus features so I played with things I didn't
> understand… Guess I played with 'expiry-wait on this group.

Yup, that often happens.

>> Simply removing this entry should be enough to let your server parameter
>> take effect. Delete that and see if it works.
>
> I did remove it then "C-c C-c". I also hit "s" in groups buffer to save
> my changes in .newsrc.eld.
>
> I checked that the file was up-to-date and it is.
>
> I started a new instance of Emacs / Gnus. The 'expiry-wait is really
> gone when I check the group using "G p". But deleting / moving of
> expired email is also gone with it… My expired messages now stay in the
> group.
>
> I could manually set 'expiry-wait on each group and it would do the job
> but I'm pretty sure it's not the right way .

*sigh*. What's supposed to happen is that this server's value for
`nnmail-expiry-wait' is dynamically bound and consulted while the server
is doing its business. If 'immediate is the value you want for
everything, you can just setq that variable in your top-level gnus
config. Otherwise you can do something like:

(setq gnus-parameters '(("^nnimap:.*" (expiry-wait 'immediate))))

To set it just for imap groups.

Otherwise I could try to fix the bug :)

Eric

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-09 16:47                     ` Eric Abrahamsen
@ 2020-04-09 19:26                       ` Nicolas Cavigneaux
  2020-04-09 20:23                         ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-09 19:26 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

>>> Simply removing this entry should be enough to let your server parameter
>>> take effect. Delete that and see if it works.
>>
>> I did remove it then "C-c C-c". I also hit "s" in groups buffer to save
>> my changes in .newsrc.eld.
>>
>> I checked that the file was up-to-date and it is.
>>
>> I started a new instance of Emacs / Gnus. The 'expiry-wait is really
>> gone when I check the group using "G p". But deleting / moving of
>> expired email is also gone with it… My expired messages now stay in the
>> group.
>>
>> I could manually set 'expiry-wait on each group and it would do the job
>> but I'm pretty sure it's not the right way .
>
> *sigh*. What's supposed to happen is that this server's value for
> `nnmail-expiry-wait' is dynamically bound and consulted while the server
> is doing its business. If 'immediate is the value you want for
> everything, you can just setq that variable in your top-level gnus
> config. Otherwise you can do something like:

What variable are you talking about? nnmail-expiry-wait seems OK to me:

nnmail-expiry-wait is a variable defined in ‘nnmail.el’.
Its value is 'immediate
Original value was 7


> (setq gnus-parameters '(("^nnimap:.*" (expiry-wait 'immediate))))
>
> To set it just for imap groups.

It would be OK. I don't mind being explicit even if it's intended to
work without a workaround. So I tried:

gnus-parameters is a variable defined in ‘gnus.el’.
Its value is (("^nnimap:.*" (expiry-wait 'immediate)))
Original value was nil

But it doesn't expire anything in my imap groups.

> Otherwise I could try to fix the bug :)

That would be really kind of you but I don't want to bother you with
this. You already spent a lot of time helping me.

Moreover I'm maybe doing something wrong. It seems that I'm the only one
facing this "bug".

As I said I can set 'expiry-wait manually for each group. It's clearly
not the most effective way of achieving my goal but it would work.

By reading your advice I feel like I'm doing something wrong, it should work.
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-09 19:26                       ` Nicolas Cavigneaux
@ 2020-04-09 20:23                         ` Eric Abrahamsen
  2020-04-09 20:27                           ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-09 20:23 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>>> Simply removing this entry should be enough to let your server parameter
>>>> take effect. Delete that and see if it works.
>>>
>>> I did remove it then "C-c C-c". I also hit "s" in groups buffer to save
>>> my changes in .newsrc.eld.
>>>
>>> I checked that the file was up-to-date and it is.
>>>
>>> I started a new instance of Emacs / Gnus. The 'expiry-wait is really
>>> gone when I check the group using "G p". But deleting / moving of
>>> expired email is also gone with it… My expired messages now stay in the
>>> group.
>>>
>>> I could manually set 'expiry-wait on each group and it would do the job
>>> but I'm pretty sure it's not the right way .
>>
>> *sigh*. What's supposed to happen is that this server's value for
>> `nnmail-expiry-wait' is dynamically bound and consulted while the server
>> is doing its business. If 'immediate is the value you want for
>> everything, you can just setq that variable in your top-level gnus
>> config. Otherwise you can do something like:
>
> What variable are you talking about? nnmail-expiry-wait seems OK to me:
>
> nnmail-expiry-wait is a variable defined in ‘nnmail.el’.
> Its value is 'immediate
> Original value was 7
>
>
>> (setq gnus-parameters '(("^nnimap:.*" (expiry-wait 'immediate))))
>>
>> To set it just for imap groups.
>
> It would be OK. I don't mind being explicit even if it's intended to
> work without a workaround. So I tried:
>
> gnus-parameters is a variable defined in ‘gnus.el’.
> Its value is (("^nnimap:.*" (expiry-wait 'immediate)))
> Original value was nil
>
> But it doesn't expire anything in my imap groups.
 
Okay, first of all I gave you a bum regexp because I didn't test it
first, my bad! The colon shouldn't be in there, that's blocking it from
matching the group name. There's no reason for that bit anyway, just
"^nnimap" should be sufficient.

Second of all, even with a good regexp, it won't return
the correct parameter, apparently because of a bug in the code. I'll
open a bug report for this.
 
>> Otherwise I could try to fix the bug :)
>
> That would be really kind of you but I don't want to bother you with
> this. You already spent a lot of time helping me.

No worries, this is the "help users" group, besides which there's at
least one real bug in here.

> Moreover I'm maybe doing something wrong. It seems that I'm the only one
> facing this "bug".
>
> As I said I can set 'expiry-wait manually for each group. It's clearly
> not the most effective way of achieving my goal but it would work.
>
> By reading your advice I feel like I'm doing something wrong, it should work.

Yes, all of these methods (setting `gnus-parameters', setting
`nnmail-expiry-wait' globally, setting `nnmail-expiry-wait' as a server
parameter) should work. Possibly you've done something funny somewhere,
but the fact that the first method has already uncovered a bug makes me
suspicious of the rest of it. I'll ask on gnus.general (I feel like
there's more eyes on that group) what other people are using, and make
sure something works.

E

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-09 20:23                         ` Eric Abrahamsen
@ 2020-04-09 20:27                           ` Eric Abrahamsen
  2020-04-09 21:15                             ` Nicolas Cavigneaux
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-09 20:27 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Nicolas Cavigneaux <cavigneaux@gmail.com> writes:
>
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>>>> Simply removing this entry should be enough to let your server parameter
>>>>> take effect. Delete that and see if it works.
>>>>
>>>> I did remove it then "C-c C-c". I also hit "s" in groups buffer to save
>>>> my changes in .newsrc.eld.
>>>>
>>>> I checked that the file was up-to-date and it is.
>>>>
>>>> I started a new instance of Emacs / Gnus. The 'expiry-wait is really
>>>> gone when I check the group using "G p". But deleting / moving of
>>>> expired email is also gone with it… My expired messages now stay in the
>>>> group.
>>>>
>>>> I could manually set 'expiry-wait on each group and it would do the job
>>>> but I'm pretty sure it's not the right way .
>>>
>>> *sigh*. What's supposed to happen is that this server's value for
>>> `nnmail-expiry-wait' is dynamically bound and consulted while the server
>>> is doing its business. If 'immediate is the value you want for
>>> everything, you can just setq that variable in your top-level gnus
>>> config. Otherwise you can do something like:
>>
>> What variable are you talking about? nnmail-expiry-wait seems OK to me:
>>
>> nnmail-expiry-wait is a variable defined in ‘nnmail.el’.
>> Its value is 'immediate
>> Original value was 7
>>
>>
>>> (setq gnus-parameters '(("^nnimap:.*" (expiry-wait 'immediate))))
>>>
>>> To set it just for imap groups.
>>
>> It would be OK. I don't mind being explicit even if it's intended to
>> work without a workaround. So I tried:
>>
>> gnus-parameters is a variable defined in ‘gnus.el’.
>> Its value is (("^nnimap:.*" (expiry-wait 'immediate)))
>> Original value was nil
>>
>> But it doesn't expire anything in my imap groups.
>  
> Okay, first of all I gave you a bum regexp because I didn't test it
> first, my bad! The colon shouldn't be in there, that's blocking it from
> matching the group name. There's no reason for that bit anyway, just
> "^nnimap" should be sufficient.

Bah, how many times before I learn not to post untested code?! It should
be:

(setq gnus-parameters '(("^nnimap" (expiry-wait . immediate))))

Ie the parameter should be set as (car . cdr), not a list, and no quote
on 'immediate.

I still think it's weird that the nnmail-expiry-wait method doesn't
do it, but that at least should get you a working set up.

Eric

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-09 20:27                           ` Eric Abrahamsen
@ 2020-04-09 21:15                             ` Nicolas Cavigneaux
  2020-04-09 21:32                               ` Eric Abrahamsen
  0 siblings, 1 reply; 17+ messages in thread
From: Nicolas Cavigneaux @ 2020-04-09 21:15 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Bah, how many times before I learn not to post untested code?! It should
> be:
>
> (setq gnus-parameters '(("^nnimap" (expiry-wait . immediate))))

It works as expected. My expired emails are now deleted when
I quit a group.

I know it's not the expected behavior but it works for me. If you can
fix the bug upstream it would be great but I can't thank you enough for
your help.

Thank you Eric!
-- 
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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Expiring nnimap messages automatically
  2020-04-09 21:15                             ` Nicolas Cavigneaux
@ 2020-04-09 21:32                               ` Eric Abrahamsen
  0 siblings, 0 replies; 17+ messages in thread
From: Eric Abrahamsen @ 2020-04-09 21:32 UTC (permalink / raw)
  To: Nicolas Cavigneaux; +Cc: info-gnus-english

Nicolas Cavigneaux <cavigneaux@gmail.com> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Bah, how many times before I learn not to post untested code?! It should
>> be:
>>
>> (setq gnus-parameters '(("^nnimap" (expiry-wait . immediate))))
>
> It works as expected. My expired emails are now deleted when
> I quit a group.
>
> I know it's not the expected behavior but it works for me. If you can
> fix the bug upstream it would be great but I can't thank you enough for
> your help.
>
> Thank you Eric!

My pleasure, I probably could have gotten there sooner :) I'll take a
look at the nnmail-expiry-wait conundrum over the weekend.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, back to index

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07  8:42 Expiring nnimap messages automatically 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
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

Unnamed repository; edit this file 'description' to name the repository.

Archives are clonable: git clone --mirror http://inbox.vuxu.org/info-gnus-english

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.emacs.gnus.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git