From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/10816 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Backing up expired mail? Date: 27 Apr 1997 11:01:01 +0200 Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035150625 26614 80.91.224.250 (20 Oct 2002 21:50:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:50:25 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id CAA30150 for ; Sun, 27 Apr 1997 02:22:26 -0700 Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Sun, 27 Apr 1997 11:16:48 +0200 Original-Received: (qmail 28098 invoked by uid 504); 27 Apr 1997 09:14:29 -0000 Original-Received: (qmail 28095 invoked from network); 27 Apr 1997 09:14:29 -0000 Original-Received: from ifi.uio.no (0@129.240.64.2) by claymore.vcinet.com with SMTP; 27 Apr 1997 09:14:28 -0000 Original-Received: from proletcult.slip.ifi.uio.no (root@ppp11.larris.ifi.uio.no [129.240.68.111]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 27 Apr 1997 11:16:43 +0200 Original-Received: (from larsi@localhost) by proletcult.slip.ifi.uio.no (8.8.2/8.8.2) id LAA17475; Sun, 27 Apr 1997 11:01:11 +0200 Mail-Copies-To: never Original-To: ding@gnus.org In-Reply-To: Steinar Bang's message of 24 Apr 1997 19:00:10 +0200 Original-Lines: 51 X-Mailer: Gnus v5.4.47/Emacs 19.34 X-Face: &w!^oO~dS|}-P0~ge{$c!h\ 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