[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: expiring mail in Gnus



Matthias Hertel <mhertel@bigfoot.de> writes:
> I'd like to configure Gnus to make reading debian-users somewhat
> newsgroup-like, ie. all messages that are read (as opposed to unread,
> ticked, or dormant) should be deleted from my disk after three days. I
> thought that setting the following group parameters for my debian-users
> group would accomplish this:
>
> ((to-list . "debian-user@lists.debian.org")
>  (total-expire . t)
>  (expiry-wait . 3)
>  (gcc-self . none))
>
> But it doesn't. Articles that are much older than three days and read
> (appear as `O' when I open the group) don't get deleted. C-c C-M-x
> (`expire all expirable articles') in the group buffer doesn't help
> either.
>
> I use Pterodactyl Gnus with XEmacs (potato), but I had the same
> problem with the built-in Gnus in GNU Emacs (slink). As I do only read
> mail with Gnus, I have nnfolder as my select-method. Here's my .gnus:
[snip]
> Have I completely misunderstood what Gnus means by `expiring' or is
> there just some global setting that's meant to keep users from
> inadvertedly turning total-expire on?

My setup is a bit different, but it may help you. Namely I'm using
auto-expiry, but I have the following expiry related settings in my
~/.gnus file:

1) The following disables expiry on group exit, which is the default,
and instead uses the gnus-demon to automatically, every thirty
minutes, expire all the groups I have set to expire. Also, the demon
saves news every minute.

  (remove-hook 'gnus-summary-prepare-exit-hook 'gnus-summary-expire-articles)
  (gnus-demon-add-handler 'gnus-group-expire-all-groups 30 30)
  (gnus-demon-add-handler 'gnus-group-save-newsrc 1 1)

2) The following sets ALL my mail groups to expirable:

  (setq gnus-auto-expirable-newsgroups
        "mail.*")

3) And I think this is your main problem. 

Once you read an article it generally has one of three "marks" next to
it:

O means the article/mail was read, but is not marked as read.
E means the article/mail was read and marked as expirable
! means the article is marked to be kept

You need to mark the articles as expirable as you read them. This
means using the "E" key instead of the "d" when reading articles. This
was annoying to me since I always want to expire articles/mail that I
read and don't explicitly mark as keepable with the "!" key. So, what
I did was redefine my "d" key to mark the article as expirable instead
of just read:

  (add-hook 'gnus-summary-mode-hook
	    '(lambda ()
	       (local-set-key "d" 'gnus-summary-mark-as-expirable)))

I think you'll find that if you go into the groups you marked as
expirable and hit the "E" key next to the articles, which should get
rid of the "O" mark you'll get the behavior you were expecting.

> A somewhat related problem: Normally read and dormant messages are
> hidden from the summary buffer. How do I *temporarily* make them
> visible? There is a group parameter called `display' that controls
> this, but I don't want to edit the group parameters every time I find
> myself wanting to reread an article I read two days ago. (But I'd like
> to keep the short format as the default.)

Normally you just put the cursor by the group name and hit
space. Instead, to temporarily make all articles visible, just hit C-u
before you hit the space bar when selecting the group.

Good Luck, gnus is a wonderful email handler, but it's a bit of a
nightmare to configure.

Gary


Reply to: