From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40138 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Extract Group param data from .newsrc.eld Date: Thu, 08 Nov 2001 23:03:23 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035175733 31616 80.91.224.250 (21 Oct 2002 04:48:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:48:53 +0000 (UTC) Return-Path: Original-Received: (qmail 23515 invoked from network); 9 Nov 2001 07:05:39 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 9 Nov 2001 07:05:39 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1625iP-0008I0-00; Fri, 09 Nov 2001 01:04:37 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 09 Nov 2001 01:04:18 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id BAA03096 for ; Fri, 9 Nov 2001 01:04:08 -0600 (CST) Original-Received: (qmail 23505 invoked by alias); 9 Nov 2001 07:04:21 -0000 Original-Received: (qmail 23500 invoked from network); 9 Nov 2001 07:04:21 -0000 Original-Received: from smtp.newsguy.com (HELO newsguy.com) (209.155.56.71) by gnus.org with SMTP; 9 Nov 2001 07:04:21 -0000 Original-Received: from reader.local.lan (adsl-66.51.210.228.dslextreme.com [66.51.210.228]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id XAA53749 for ; Thu, 8 Nov 2001 23:03:52 -0800 (PST) Original-Received: (from reader@localhost) by reader.local.lan (8.11.6/8.11.6) id fA973pm17077; Thu, 8 Nov 2001 23:03:51 -0800 Original-To: ding@gnus.org User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i586-pc-linux-gnu) Original-Lines: 62 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40138 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40138 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 ") (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.