From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64809 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: Pretty-printing .newsrc.eld Date: Thu, 14 Jun 2007 21:24:42 +0200 Message-ID: References: <20070610173005.GA1276@kobe.laptop> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181849264 13838 80.91.229.12 (14 Jun 2007 19:27:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2007 19:27:44 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M13320@lists.math.uh.edu Thu Jun 14 21:27:43 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 1Hyuys-0006gL-CM for ding-account@gmane.org; Thu, 14 Jun 2007 21:27:42 +0200 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 1Hyuxf-0001KE-Ix; Thu, 14 Jun 2007 14:26:27 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Hyuxc-0001K0-RA for ding@lists.math.uh.edu; Thu, 14 Jun 2007 14:26:24 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1Hyuxb-0004YC-CE for ding@lists.math.uh.edu; Thu, 14 Jun 2007 14:26:24 -0500 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 1HyuxZ-0006Zk-00 for ; Thu, 14 Jun 2007 21:26:21 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HyuxW-00083B-AB for ding@gnus.org; Thu, 14 Jun 2007 21:26:18 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jun 2007 21:26:18 +0200 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Jun 2007 21:26:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 46 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: .*T0'iU(sujq_j9\J>-d4fg;N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:giI9Nc4iqCxJUcJfhDwG5a8DdjM= X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64809 Archived-At: On Thu, Jun 14 2007, Katsumi Yamaoka wrote: > (add-hook > 'gnus-save-quick-newsrc-hook > (lambda nil > "Pretty print Lisp objects in the .newsrc.eld file." [...] > (pp obj cur))))) > > It works, however it takes too much time and the ones it makes > are not very easy to read. :< I have the following poor man's pretty print in this hook: (defun rs-gnus-save-newsrc-with-whitespace-1 () "Save ~/.newsrc.eld with extra whitespace." ;; (gnus-message 5 "Adding whitespace to .newsrc.eld") (save-excursion (goto-char (point-min)) (while (re-search-forward "(\\\"\\| ((\\| (nn" nil t) (replace-match "\n \\&" t)) (delete-trailing-whitespace))) Additionally, I added newlines to make `forward-paragraph' work. I think this one could be installed in the trunk. --8<---------------cut here---------------start------------->8--- --- gnus-start.el 7 Jun 2007 11:59:35 -0000 7.50 +++ gnus-start.el 14 Jun 2007 19:22:37 -0000 @@ -2866,7 +2866,7 @@ (while variables (when (and (boundp (setq variable (pop variables))) (symbol-value variable)) - (princ "(setq ") + (princ "\n(setq ") (princ (symbol-name variable)) (princ " '") (prin1 (symbol-value variable)) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/