Gnus development mailing list
 help / color / mirror / Atom feed
* Extract Group param data from .newsrc.eld
@ 2001-11-09  7:03 Harry Putnam
  0 siblings, 0 replies; only message in thread
From: Harry Putnam @ 2001-11-09  7:03 UTC (permalink / raw)


I imagine a few people here have had the experience of crapping up a
current newsrc.eld file one way or another, and finding all or most
Group param settings gone.  Usually unnoticed for some period of time.

During that time many other parts of newsrc.eld may also have changed,
making it unwise to simply overwrite .newsrc.eld with a backup that
contains the group param settings.  

I know there has been some talk of putting that kind of data somewhere
else which will resolve this issue in a much more profound way than
what I am trying to do.  Until then and prompted by a recent
occurrence of just such a situation, I started to write awk scripting
that would extract group param settings and present them on stdout in
a way that would facilitate copy pasting them into 
`G p' (`gnus-group-edit-group-parameters') or 
`G E' (`gnus-group-edit-group'), in a semi wholesale way.

I don't know about the rest of you, but I've had this experience a few
times and it is always a large scale pita getting those settings back
in place.  Inevitably some of them are things I have to look up again
to refresh my memory as to how to get this or that behavior. 

As I started getting into it a little, I came to see that I can do
this with awk with some stumbling around for the right regexps etc,
but it occured to me that since this is elisp, it probably makes a lot
more sense and would actually be easier to do this in elisp.
Might even lead to a usefull utility tool to have around.

I wondered if anyone has ever done this... That is, take an old copy
of .newsrc.eld and extract the Group param information in a way that
would present one with a buffer full of info like:

   nnml:SomeFriend
   Group param settings:
   
   ((to-address . "Friend <good_listener@some.add>")
    (gcc-self . t)
    (display . all)
    (gnus-show-threads nil))
    -- 
    nnml:NextGroup
    Group param settings:
    etc etc

Some of them more complex..  But really, even the easy ones like
above, I might need to look up something to remember exact syntax for
`gnus-show-thread nil', since it doesn't follow the dotted pair
syntax, maybe visit the `G c' buffer or some other time consuming thing
when what I really need is just to plop it into a G p buffer all ready
to go.

If one had thirty groups with settings like these it would be a real
time saver to be able to extract that info from old backup copies of
.newsrc.eld in some usefull way.

Maybe even more to the point to have a command in gnus that extracts
this info enmasse and stashes it somewhere once a day or something.
Newsrc.eld is a sufficiently complex file that it is probably a bad
idea to try to hand edit it in this massive a way.

But, plopping ready made Group params into G p buffers would be
something that a mildly experienced user could do with confidence.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-11-09  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-09  7:03 Extract Group param data from .newsrc.eld Harry Putnam

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