From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: Pretty-printing .newsrc.eld
Date: Fri, 15 Jun 2007 15:59:05 +0900 [thread overview]
Message-ID: <b4mwsy5g0ue.fsf@jpl.org> (raw)
In-Reply-To: <v9odji9w5h.fsf@marauder.physik.uni-ulm.de>
>>>>> In <v9odji9w5h.fsf@marauder.physik.uni-ulm.de>
>>>>> Reiner Steib wrote:
> On Thu, Jun 14 2007, Katsumi Yamaoka wrote:
>> 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."
This took 6 seconds while the rich man's version took 18 seconds
(in the condition where: (length gnus-newsrc-alist) => 1552).
> Additionally, I added newlines to make `forward-paragraph' work. I
> think this one could be installed in the trunk.
> --- 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))
It seems useful for a few people including me. ;-) Though it
might be sufficient to such people to do that by a hook:
(add-hook
'gnus-save-quick-newsrc-hook
(lambda nil
(goto-char (point-min))
(while (search-forward "\n(setq " nil t)
(replace-match "\n\n(setq "))))
It took 0.012 seconds.
next prev parent reply other threads:[~2007-06-15 6:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-10 17:30 Giorgos Keramidas
2007-06-14 7:27 ` Katsumi Yamaoka
2007-06-14 19:24 ` Reiner Steib
2007-06-15 6:59 ` Katsumi Yamaoka [this message]
2007-06-15 17:32 ` Reiner Steib
2007-06-16 11:31 ` Katsumi Yamaoka
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=b4mwsy5g0ue.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
/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).