From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65898 Path: news.gmane.org!not-for-mail From: Daniel Pittman Newsgroups: gmane.emacs.gnus.general Subject: Re: .newsrc.eld should have one newline per group Date: Thu, 06 Dec 2007 19:35:14 +1100 Organization: Cybersource: Australia's Leading Linux and Open Source Solutions Company Message-ID: <877ijsdxvh.fsf@enki.rimspace.net> References: <873auktzlo.fsf_-_@jidanni.org> <87k5ntsodd.fsf@grepfind.mwolson.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196931418 13082 80.91.229.12 (6 Dec 2007 08:56:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2007 08:56:58 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14393@lists.math.uh.edu Thu Dec 06 09:57:07 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1J0CXZ-0004sw-9m for ding-account@gmane.org; Thu, 06 Dec 2007 09:57:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1J0CWg-0002Zw-GL; Thu, 06 Dec 2007 02:56:10 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1J0CWe-0002Ze-OZ for ding@lists.math.uh.edu; Thu, 06 Dec 2007 02:56:08 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1J0CWX-0006NQ-Np for ding@lists.math.uh.edu; Thu, 06 Dec 2007 02:56:08 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1J0CWU-0005XQ-00 for ; Thu, 06 Dec 2007 09:55:58 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1J0CQV-0004Ie-Mm for ding@gnus.org; Thu, 06 Dec 2007 08:49:47 +0000 Original-Received: from 203-217-31-70.perm.iinet.net.au ([203.217.31.70]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Dec 2007 08:49:47 +0000 Original-Received: from daniel by 203-217-31-70.perm.iinet.net.au with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Dec 2007 08:49:47 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 203-217-31-70.perm.iinet.net.au User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:RtYTWtWXSXGp0M1r3+pNJWwMqhw= X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65898 Archived-At: James Cloos writes: >>>>>> "Jidanni" == writes: >>>>>> "Michael" == Michael Olson writes: > > Jidanni> we instead maintain .newsrc.eld with one newline per newsgroup, > Jidanni> yes lisp indented, but minimally. > > Michael> I fully agree. I recently had to selectively restore items > Michael> from a backed-up .newsrc.eld file, and Emacs took a long time > Michael> to move around in that file. > > I'd like to see that as well, but it isn't the easiest change to make. > > The current code uses (symbol-value) to get the value of each variable > when writing out the (setq) lines into the buffer which gets written out > to the ~/.nesrc.eld file. > > Emacs-lisp-mode has a (lisp-fill-paragraph) function, but that is more > about filling comment blocks correctly; new code will be required which > calls (fill-paragraph) will useful values for paragraph-start, et al > and then runs (indent-sexp). [...] > The other alternative is to loop through gnus-newsrc-alist one value at > a time, storing it in a temp variable and calling (symbol-value) on each > of those. Actually, another option exists, which is to use the `pp' function and friends to generate the formatted output. This already takes care of the formatting, ships in core Emacs and XEmacs, and is reasonable efficient. Regards, Daniel -- Daniel Pittman Phone: 03 9621 2377 Level 4, 10 Queen St, Melbourne Web: http://www.cyber.com.au Cybersource: Australia's Leading Linux and Open Source Solutions Company