Gnus development mailing list
 help / color / mirror / Atom feed
* Backing up expired mail?
@ 1997-04-19 14:23 Norman Walsh
  1997-04-21  0:35 ` Lars Magne Ingebrigtsen
  1997-04-22  2:16 ` Dewey M. Sasser
  0 siblings, 2 replies; 9+ messages in thread
From: Norman Walsh @ 1997-04-19 14:23 UTC (permalink / raw)


Hello world,

I get the impression from the info pages that expired mail is deleted.
(Duh! ;-)  But I wonder, is it possible to move the expired mail into
a backup folder instead?  So that mail expired from 

  some.folder.I.care.about

is actually added to

  some.folder.I.care.about.backup

before being deleted?  (I have my own setup with nnmh that does this, but
I'd like to move to nnfolder...)

I suppose it would suffice to add the mail to both folders to begin with
and only expire it from one but I'd end up with a lot of duplicated mail
that way.  (On the other hand, if this is what I have to do, er, how
would I do it? ;-)

--norm


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

* Re: Backing up expired mail?
  1997-04-19 14:23 Backing up expired mail? Norman Walsh
@ 1997-04-21  0:35 ` Lars Magne Ingebrigtsen
  1997-04-22  9:07   ` Norman Walsh
  1997-04-22 11:14   ` Hrvoje Niksic
  1997-04-22  2:16 ` Dewey M. Sasser
  1 sibling, 2 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-04-21  0:35 UTC (permalink / raw)


Norman Walsh <norm@berkshire.net> writes:

> I get the impression from the info pages that expired mail is deleted.
> (Duh! ;-)  But I wonder, is it possible to move the expired mail into
> a backup folder instead?

If you don't want to delete old mail, why do you want to move it?
Can't you just keep it in the group?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Backing up expired mail?
  1997-04-19 14:23 Backing up expired mail? Norman Walsh
  1997-04-21  0:35 ` Lars Magne Ingebrigtsen
@ 1997-04-22  2:16 ` Dewey M. Sasser
  1997-04-24 12:01   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Dewey M. Sasser @ 1997-04-22  2:16 UTC (permalink / raw)


>>>>> "Norman" == Norman Walsh <norm@berkshire.net> writes:

    Norman> Hello world, I get the impression from the info pages that
    Norman> expired mail is deleted.  (Duh! ;-) But I wonder, is it
    Norman> possible to move the expired mail into a backup folder
    Norman> instead?

While we're on the topic, I'd love to be able to set a second expiry
value and have Gnus move all mail in that category to another (nnml)
tree. 

I.e.

~/mail/foo/1
       bar/2
       baz/3

When "~/mail/baz/3" exceeds the appropriate value (say, 90 days), it
gets put into "~/last-quarter-mail/baz/3" or some such.

This is yet another idea for people with too much time and too little
to do :)

-- 
Dewey M. Sasser 			voice: (617) 494-6000 
dewey@newvision.com                     PGP Key from public servers  
                                        PGP mail preferred.
---
Managing software engineers is like herding cats.
                         - unknown


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

* Re: Backing up expired mail?
  1997-04-21  0:35 ` Lars Magne Ingebrigtsen
@ 1997-04-22  9:07   ` Norman Walsh
  1997-04-24 12:01     ` Lars Magne Ingebrigtsen
  1997-04-22 11:14   ` Hrvoje Niksic
  1 sibling, 1 reply; 9+ messages in thread
From: Norman Walsh @ 1997-04-22  9:07 UTC (permalink / raw)
  Cc: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Norman Walsh <norm@berkshire.net> writes:
> 
> > I get the impression from the info pages that expired mail is deleted.
> > (Duh! ;-)  But I wonder, is it possible to move the expired mail into
> > a backup folder instead?
> 
> If you don't want to delete old mail, why do you want to move it?
> Can't you just keep it in the group?

Well, the idea is that I'd like to keep the folders that I actually
read as small as possible to keep things as fast as possible, but I'm
too paranoid to actually delete mail that I receive.  So I move it out
of my mail folders as soon as it's "deleted" and a few days old, then
periodically I move it offline completely.

For nnmh, I was able to build the functionality that I wanted with a
perl script, but I want to switch to nnfolder and with all the mail in
one big file, I'm afraid I'll munge things completely if I try to hack
the folder file.

On the other hand, if you can point me to some doc that describes exactly
what I need to change/update when I remove lines from an nnfolder file,
I'll happily update my hacks ;-)

--norm


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

* Re: Backing up expired mail?
  1997-04-21  0:35 ` Lars Magne Ingebrigtsen
  1997-04-22  9:07   ` Norman Walsh
@ 1997-04-22 11:14   ` Hrvoje Niksic
  1 sibling, 0 replies; 9+ messages in thread
From: Hrvoje Niksic @ 1997-04-22 11:14 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Norman Walsh <norm@berkshire.net> writes:
> 
> > I get the impression from the info pages that expired mail is deleted.
> > (Duh! ;-)  But I wonder, is it possible to move the expired mail into
> > a backup folder instead?
> 
> If you don't want to delete old mail, why do you want to move it?
> Can't you just keep it in the group?

Because after a time the group becomes too large to enter/browse
comfortably.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
* Vi is the God of editors.
* Emacs is the editor of Gods.


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

* Re: Backing up expired mail?
  1997-04-22  9:07   ` Norman Walsh
@ 1997-04-24 12:01     ` Lars Magne Ingebrigtsen
  1997-04-24 17:00       ` Steinar Bang
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-04-24 12:01 UTC (permalink / raw)


Norman Walsh <norm@berkshire.net> writes:

> For nnmh, I was able to build the functionality that I wanted with a
> perl script, but I want to switch to nnfolder and with all the mail in
> one big file, I'm afraid I'll munge things completely if I try to hack
> the folder file.

I'd suggest doing this from inside Gnus.  Write a macro to enter the
group, process-mark all the articles and `B m' them to somewhere else.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Backing up expired mail?
  1997-04-22  2:16 ` Dewey M. Sasser
@ 1997-04-24 12:01   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-04-24 12:01 UTC (permalink / raw)


"Dewey M. Sasser" <dewey@newvision.com> writes:

> While we're on the topic, I'd love to be able to set a second expiry
> value and have Gnus move all mail in that category to another (nnml)
> tree. 

I don't really think this would be all that useful.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: Backing up expired mail?
  1997-04-24 12:01     ` Lars Magne Ingebrigtsen
@ 1997-04-24 17:00       ` Steinar Bang
  1997-04-27  9:01         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Steinar Bang @ 1997-04-24 17:00 UTC (permalink / raw)


>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org>:

>>>>> Norman Walsh <norm@berkshire.net>:

>> Well, the idea is that I'd like to keep the folders that I actually
>> read as small as possible to keep things as fast as possible, but
>> I'm too paranoid to actually delete mail that I receive.  So I move
>> it out of my mail folders as soon as it's "deleted" and a few days
>> old, then periodically I move it offline completely.

I've wanted similar functionality, for just about the same reason.
The problem with refiling to a host of other groups, is that stuff
gets lost and forgotten.

I don't think I'd want more than two levels (maybe the mail group
itself, and another group with the same name, suffixed by ".old").
I'd also like all articles in the old folder to be compressed.

>> For nnmh, I was able to build the functionality that I wanted with
>> a perl script, but I want to switch to nnfolder and with all the
>> mail in one big file, I'm afraid I'll munge things completely if I
>> try to hack the folder file.

> I'd suggest doing this from inside Gnus.  Write a macro to enter the
> group, process-mark all the articles and `B m' them to somewhere
> else.

Hm... is this a keyboard macro, or a lisp macro? (I've never quite
understood lisp macros...).

I guess I would try to write some emacs lisp code to do this, and then
try to run that as a daemon (the way I run expiry now).

What would be the best/simplest way to gzip the articles, after I've
moved them?


- Steinar


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

* Re: Backing up expired mail?
  1997-04-24 17:00       ` Steinar Bang
@ 1997-04-27  9:01         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-04-27  9:01 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:

> > I'd suggest doing this from inside Gnus.  Write a macro to enter the
> > group, process-mark all the articles and `B m' them to somewhere
> > else.
> 
> Hm... is this a keyboard macro, or a lisp macro? (I've never quite
> understood lisp macros...).

Keyboard macro.

> What would be the best/simplest way to gzip the articles, after I've
> moved them?

Hm...  I think the easiest would be to do it from a shell, but you can
also do some mapcar'ing on the output from `directory-files'.  Perhaps
there should be a function to do this; it's not uncommon that one
wants to do something like this.

  (shell-map-directory-files "~/some/dir/" "gzip" "^[0-9]+$")

to run gzip on all files that match that regexp.

Howzabout this:

(defun shell-map-directory-files (directory program &optional regularp match)
  "Execute PROGRAM on all the files in DIRECTORY.
If REGULARP (the prefix), only use the files that are regular files.
If MATCH, only use the files that match this regexp.

If PROGRAM contains the string \"%s\", insert each file name to be
processed there.  For instance:

   \(shell-map-directory-files \"~/smallfiles\" \"cat %s >> /tmp/bigfile\" t)

The number of files processed will be returned."
  (interactive "DDirectory: \nsProgram: \nP")
  (let ((format (if (string-match "%s" program) 'format 'concat)))
    (length
     (mapcar
      (lambda (file)
	(call-process shell-file-name nil nil nil shell-command-switch
		      (funcall format program file)))
      (directory-files directory t match)))))

If this seems useful, I'll mail it to RMS and see whether it can be
included in Emacs.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1997-04-27  9:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-19 14:23 Backing up expired mail? Norman Walsh
1997-04-21  0:35 ` Lars Magne Ingebrigtsen
1997-04-22  9:07   ` Norman Walsh
1997-04-24 12:01     ` Lars Magne Ingebrigtsen
1997-04-24 17:00       ` Steinar Bang
1997-04-27  9:01         ` Lars Magne Ingebrigtsen
1997-04-22 11:14   ` Hrvoje Niksic
1997-04-22  2:16 ` Dewey M. Sasser
1997-04-24 12:01   ` Lars Magne Ingebrigtsen

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