Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: tiarnan.ocorrain@logicacmg.com (Tiarnán Ó Corráin), ding@gnus.org
Subject: Re: Saving some read IMAP messages to a local folder
Date: Mon, 03 Feb 2003 10:47:21 +0100	[thread overview]
Message-ID: <ilun0ld8zme.fsf@latte.josefsson.org> (raw)
In-Reply-To: <ur8apsp6n.fsf@axis.com> (Niklas Morberg's message of "Mon, 03 Feb 2003 10:12:32 +0100")

Niklas Morberg <niklas.morberg@axis.com> writes:

> (setq gnus-agent-expire-days 36500)
...
> When I first tried this a couple of weeks ago, I missed
> setting the gnus-agent-expire days to a large number and my
> local articles got deleted as well.

Is the default for g-a-e-d (7) a good one?  It goes against the
principle that Gnus never expire or delete any articles unless you
configure it to do so.

I think articles in the agent should not be expired by default.  Disk
is cheap compared to accidently losing mail.  Patch below is untested.

--- gnus-agent.el.~6.136.~	Thu Jan 30 05:42:20 2003
+++ gnus-agent.el	Mon Feb  3 10:45:54 2003
@@ -1,5 +1,5 @@
 ;;; gnus-agent.el --- unplugged support for Gnus
-;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
 ;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -59,12 +59,14 @@
   :group 'gnus-agent
   :type 'integer)
 
-(defcustom gnus-agent-expire-days 7
+(defcustom gnus-agent-expire-days nil
   "Read articles older than this will be expired.
-This can also be a list of regexp/day pairs.  The regexps will
-be matched against group names."
+This can also be a list of regexp/day pairs.  The regexps will be
+matched against group names.  If nil, articles in the agent cache are
+never expired."
   :group 'gnus-agent
-  :type 'integer)
+  :type '(choice (number :tag "days")
+		 (const :tag "never" nil)))
 
 (defcustom gnus-agent-expire-all nil
   "If non-nil, also expire unread, ticked and dormant articles.
@@ -2124,8 +2126,11 @@
 FORCE is equivalent to setting gnus-agent-expire-days to zero(0)."
   (interactive)
 
-  (if (or (not (eq articles t))
-          (yes-or-no-p (concat "Are you sure that you want to expire all articles in " (if group group "every agentized group") ".")))
+  (if (and (not gnus-agent-expire-days)
+	   (or (not (eq articles t))
+	       (yes-or-no-p (concat "Are you sure that you want to expire all "
+				    "articles in " (if group group
+						     "every agentized group") "."))))
       (let ((methods (if group
                          (list (gnus-find-method-for-group group))
                        gnus-agent-covered-methods))





  reply	other threads:[~2003-02-03  9:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31 15:24 Tiarnán Ó Corráin
2003-01-31 20:54 ` Simon Josefsson
2003-02-01 10:29 ` Kai Großjohann
2003-02-03  9:12 ` Niklas Morberg
2003-02-03  9:47   ` Simon Josefsson [this message]
2003-02-04  8:53     ` Niklas Morberg
2003-02-05  6:30       ` Simon Josefsson
2003-02-07 12:23         ` Lars Magne Ingebrigtsen

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=ilun0ld8zme.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    --cc=tiarnan.ocorrain@logicacmg.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).