Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Re: Mechaincal question Show filename of # marked
Date: 21 Dec 2000 07:55:19 -0800	[thread overview]
Message-ID: <m2wvct7orc.fsf@gnus-5.8.8-cvs.now.playing> (raw)
In-Reply-To: Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "21 Dec 2000 16:42:14 +0100"

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> 
> > (mapcar (lambda (g)
> >           (expand-file-name g (gnus-group-real-name
> >                                                     gnus-newsgroup-name
> >                                                     "~/Mail/")))
> >         gnus-newsgroup-processable)
> 
> 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".)
> 
> 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/".)
> 
> And I was forgetting to convert the article number (from
> gnus-newsgroup-processable) into a string -- hence int-to-string.
> 
> (mapcar (lambda (g)
>           (expand-file-name (int-to-string g)
>                             (nnheader-group-pathname
>                              (gnus-group-real-name gnus-newsgroup-name)
>                              "~/Mail/")))
>         gnus-newsgroup-processable)
> 
> 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.  

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



  reply	other threads:[~2000-12-21 15:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-21  3:06 Harry Putnam
2000-12-21 10:02 ` Kai Großjohann
2000-12-21 14:28   ` Harry Putnam
2000-12-21 15:42 ` Kai Großjohann
2000-12-21 15:55   ` Harry Putnam [this message]
2000-12-22  3:15     ` Colin Walters
2000-12-22  5:10       ` Harry Putnam
2000-12-22  6:05         ` Colin Walters
2000-12-22  8:44         ` Kai Großjohann
2000-12-22  8:40     ` Kai Großjohann

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=m2wvct7orc.fsf@gnus-5.8.8-cvs.now.playing \
    --to=reader@newsguy.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).