From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33843 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: Mechaincal question Show filename of # marked Date: 21 Dec 2000 07:55:19 -0800 Sender: owner-ding@hpc.uh.edu 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: quoted-printable X-Trace: main.gmane.org 1035169874 27254 80.91.224.250 (21 Oct 2002 03:11:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:11:14 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 08230D049D for ; Thu, 21 Dec 2000 18:51:55 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id RAB28165; Thu, 21 Dec 2000 17:51:35 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 21 Dec 2000 17:51:00 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id RAA16760 for ; Thu, 21 Dec 2000 17:50:49 -0600 (CST) Original-Received: from freedom.LABridge.com (home.LABridge.com [206.117.169.5]) by mailhost.sclp.com (Postfix) with ESMTP id F3A90D049D for ; Thu, 21 Dec 2000 18:51:04 -0500 (EST) Original-Received: from reader.labridge.com (DSL02-160.LABridge.com [206.117.4.160]) by freedom.LABridge.com (8.8.8/8.8.8) with ESMTP id PAA22548 for ; Thu, 21 Dec 2000 15:54:26 -0800 Original-Received: (from reader@localhost) by reader.labridge.com (8.9.3/8.9.3) id PAA26963; Thu, 21 Dec 2000 15:50:59 -0800 X-Authentication-Warning: reader.labridge.com: reader set sender to reader@newsguy.com using -f Original-To: ding@gnus.org In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "21 Dec 2000 16:42:14 +0100" User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5 Original-Lines: 85 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33843 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33843 Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: >=20 > > (mapcar (lambda (g) > > (expand-file-name g (gnus-group-real-name > > gnus-newsgroup-name > > "~/Mail/"))) > > gnus-newsgroup-processable) >=20 > I forgot a number of function calls. In particular, > gnus-group-real-name only takes 1 argument, the group name. (It > converts "nnml:foo.bar" into "foo.bar".) >=20 > Then I need to call nnheader-group-pathname to convert the group name > into a directory name. (It converts "foo.bar" into > "~/Mail/foo/bar/".) >=20 > And I was forgetting to convert the article number (from > gnus-newsgroup-processable) into a string -- hence int-to-string. >=20 > (mapcar (lambda (g) > (expand-file-name (int-to-string g) > (nnheader-group-pathname > (gnus-group-real-name gnus-newsgroup-name) > "~/Mail/"))) > gnus-newsgroup-processable) >=20 > Does this work? Eval with `:'. Put it into a function call if you > like. What do you want to do with it? Yes... It gives a nice list like this: ("/home/reader/Mail/prinb/13456" "/home/reader/Mail/prinb/13455" \ "/home/reader/Mail/prinb/13454" "/home/reader/Mail/prinb/13453") Cool. How can I feed that list to a shell script? Can I pipe it to a shell script some how? > . . . What do you want to do with it? That list will become stdin to some scripting (shell/awk) that will compare the message-id of those messages to message-id's already in $TARGET group. So that before continuing my process (which is either move `B m' or copy `B c') I can learn whether any of the process marked messages are already in $TARGET What to do then, I haven't got figured out yet. Maybe just make the move outside gnus and let `M-x nnml-generate bla' clean it up later. I've been thinking about doing all kinds of crufty stuff behind gnus back since it has that handy clean up tool.=20=20 A cron job at night to make things right. (poetry eh?) I move stuff around a fair bit so I run into a problem very often where I'm not sure if something has already been copied to a specific group. I've managed to piece together shell/awk scripts that do a fine job of comparing Message-IDs and reporting which files are unique etc. But the whole thing depends on getting that processs information which I now have. (... thanks) .. Just need to pipeline it into my scripting and see if there is some way to hand gnus back a list to move copy or whatever. If that seems to hard then just do it outside gnus. Probably clever ways to hook this shell scripting into something that gets called when `B m' is called. How does one call a shell script from within lisp? Here is one, probably fool idea.. A `for' loop in lisp that runs through that list and records the Message-ids, and compares them to a cache held somewhere. Determines if any are dups and tells the user if so. queries user whether or not to proceed. Process marks are adjusted to suit the findings internally somehow. and then..... Chocolate cake and ice cream is served. Gnus does the dishes. .... In the .. he he he...`kitchen sink (TM)'=20