Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Extract Group param data from .newsrc.eld
Date: Thu, 08 Nov 2001 23:03:23 -0800	[thread overview]
Message-ID: <m11yj84e9w.fsf@reader.newsguy.com> (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.



                 reply	other threads:[~2001-11-09  7:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=m11yj84e9w.fsf@reader.newsguy.com \
    --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).