Gnus development mailing list
 help / color / mirror / Atom feed
* Re: Better .newsrc.eld formating
  2001-10-06 16:01 Better .newsrc.eld formating Jérôme Marant
@ 2001-10-06 15:16 ` François Pinard
  2001-10-06 19:25   ` Kai Großjohann
  2001-10-06 22:46   ` Jérôme Marant
  0 siblings, 2 replies; 9+ messages in thread
From: François Pinard @ 2001-10-06 15:16 UTC (permalink / raw)
  Cc: ding

[Jérôme Marant]

>   I'd like to know if it could be possible to improve the formatting
>   of .newsrc.eld. It is made of few but very long lines and it is very
>   difficult to check.  I also feel sometimes frustrated, for that
>   reason, not being able to edit it by hand, for example in order to
>   add myself Group parameters.

A while ago, someone submitted a piece of Emacs LISP code for this, which
I use since then (maybe modified a bit locally).



;; Idée de Dan Christensen <jdc@chow.mat.jhu.edu>
;; Save the .newsrc.eld file with extra line breaks.
(defun fp-gnus-save-quick-newsrc-routine ()
  (gnus-message 4 "Adding whitespace to .newsrc.eld")
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward "^(\\|(\\\"" nil t)
      (replace-match "\n\\&" t))
    (goto-char (point-min))
    (while (re-search-forward " $" nil t)
      (replace-match "" t t))))
(add-hook 'gnus-save-quick-newsrc-hook 'fp-gnus-save-quick-newsrc-routine)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Better .newsrc.eld formating
@ 2001-10-06 16:01 Jérôme Marant
  2001-10-06 15:16 ` François Pinard
  0 siblings, 1 reply; 9+ messages in thread
From: Jérôme Marant @ 2001-10-06 16:01 UTC (permalink / raw)



Hi,

  I'd like to know if it could be possible to improve the formatting
  of .newsrc.eld. It is made of few but very long lines and it is very
  difficult to check.  I also feel sometimes frustrated, for that
  reason, not being able to edit it by hand, for example in order to
  add myself Group parameters.

  Cheers,

-- 
Jérôme Marant <jerome@marant.org>
              <jerome.marant@free.fr>

HTTP://marant.org
              



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-06 15:16 ` François Pinard
@ 2001-10-06 19:25   ` Kai Großjohann
  2001-10-06 21:40     ` François Pinard
                       ` (2 more replies)
  2001-10-06 22:46   ` Jérôme Marant
  1 sibling, 3 replies; 9+ messages in thread
From: Kai Großjohann @ 2001-10-06 19:25 UTC (permalink / raw)
  Cc: Jérôme Marant, ding

pinard@iro.umontreal.ca (François Pinard) writes:

> ;; Idée de Dan Christensen <jdc@chow.mat.jhu.edu>
> ;; Save the .newsrc.eld file with extra line breaks.
> (defun fp-gnus-save-quick-newsrc-routine ()
>   (gnus-message 4 "Adding whitespace to .newsrc.eld")
>   (save-excursion
>     (goto-char (point-min))
>     (while (re-search-forward "^(\\|(\\\"" nil t)
>       (replace-match "\n\\&" t))

Whee.  Why not just use `pp' to print the stuff out?

kai
-- 
Linux provides a nice `poweroff' command, but where is `poweron'?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-06 19:25   ` Kai Großjohann
@ 2001-10-06 21:40     ` François Pinard
  2001-10-06 22:47     ` Jérôme Marant
  2001-10-07  5:01     ` Randal L. Schwartz
  2 siblings, 0 replies; 9+ messages in thread
From: François Pinard @ 2001-10-06 21:40 UTC (permalink / raw)
  Cc: Jérôme Marant, ding

[Kai Großjohann]

> Whee.  Why not just use `pp' to print the stuff out?

Surely, `pp' would do a better job, but also, would burn a lot more CPU.
The code given is fast enough to not be much noticeable in practice, and
that's may be why I never discontinued its use. ;-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-06 15:16 ` François Pinard
  2001-10-06 19:25   ` Kai Großjohann
@ 2001-10-06 22:46   ` Jérôme Marant
  1 sibling, 0 replies; 9+ messages in thread
From: Jérôme Marant @ 2001-10-06 22:46 UTC (permalink / raw)


pinard@iro.umontreal.ca (François Pinard) writes:

> [Jérôme Marant]
> 
> >   I'd like to know if it could be possible to improve the formatting
> >   of .newsrc.eld. It is made of few but very long lines and it is very
> >   difficult to check.  I also feel sometimes frustrated, for that
> >   reason, not being able to edit it by hand, for example in order to
> >   add myself Group parameters.
> 
> A while ago, someone submitted a piece of Emacs LISP code for this, which
> I use since then (maybe modified a bit locally).
> 
> 
> 
> ;; Idée de Dan Christensen <jdc@chow.mat.jhu.edu>
> ;; Save the .newsrc.eld file with extra line breaks.
> (defun fp-gnus-save-quick-newsrc-routine ()
>   (gnus-message 4 "Adding whitespace to .newsrc.eld")
>   (save-excursion
>     (goto-char (point-min))
>     (while (re-search-forward "^(\\|(\\\"" nil t)
>       (replace-match "\n\\&" t))
>     (goto-char (point-min))
>     (while (re-search-forward " $" nil t)
>       (replace-match "" t t))))
> (add-hook 'gnus-save-quick-newsrc-hook 'fp-gnus-save-quick-newsrc-routine)

  Thanks.

-- 
Jérôme Marant <jerome@marant.org>
              <jerome.marant@free.fr>

HTTP://marant.org
              



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-06 19:25   ` Kai Großjohann
  2001-10-06 21:40     ` François Pinard
@ 2001-10-06 22:47     ` Jérôme Marant
  2001-10-07  9:51       ` Kai Großjohann
  2001-10-07  5:01     ` Randal L. Schwartz
  2 siblings, 1 reply; 9+ messages in thread
From: Jérôme Marant @ 2001-10-06 22:47 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> pinard@iro.umontreal.ca (François Pinard) writes:
> 
> > ;; Idée de Dan Christensen <jdc@chow.mat.jhu.edu>
> > ;; Save the .newsrc.eld file with extra line breaks.
> > (defun fp-gnus-save-quick-newsrc-routine ()
> >   (gnus-message 4 "Adding whitespace to .newsrc.eld")
> >   (save-excursion
> >     (goto-char (point-min))
> >     (while (re-search-forward "^(\\|(\\\"" nil t)
> >       (replace-match "\n\\&" t))
> 
> Whee.  Why not just use `pp' to print the stuff out?

  What is the way to use pp on file like .newsrc.eld?

-- 
Jérôme Marant <jerome@marant.org>
              <jerome.marant@free.fr>

HTTP://marant.org
              



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-06 19:25   ` Kai Großjohann
  2001-10-06 21:40     ` François Pinard
  2001-10-06 22:47     ` Jérôme Marant
@ 2001-10-07  5:01     ` Randal L. Schwartz
  2 siblings, 0 replies; 9+ messages in thread
From: Randal L. Schwartz @ 2001-10-07  5:01 UTC (permalink / raw)
  Cc: François Pinard, Jérôme Marant, ding

>>>>> "Kai" == Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> writes:

Kai> pinard@iro.umontreal.ca (François Pinard) writes:
>> ;; Idée de Dan Christensen <jdc@chow.mat.jhu.edu>
>> ;; Save the .newsrc.eld file with extra line breaks.
>> (defun fp-gnus-save-quick-newsrc-routine ()
>> (gnus-message 4 "Adding whitespace to .newsrc.eld")
>> (save-excursion
>> (goto-char (point-min))
>> (while (re-search-forward "^(\\|(\\\"" nil t)
>> (replace-match "\n\\&" t))

Kai> Whee.  Why not just use `pp' to print the stuff out?

Cuz PP is slow. :)

/me ducks, being the author of said routine

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-06 22:47     ` Jérôme Marant
@ 2001-10-07  9:51       ` Kai Großjohann
  2001-10-07 12:27         ` Jérôme Marant
  0 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2001-10-07  9:51 UTC (permalink / raw)
  Cc: ding

jerome.marant@free.fr (Jérôme Marant) writes:

>   What is the way to use pp on file like .newsrc.eld?

There is some spot in the Gnus Lisp code which inserts the code into
.newsrc.eld.  This spot should be changed to use pp.

But as others have mentioned, pp is slow, so the code given in this
thread is probably better...  Sorry for not thinking of this originally.

kai
-- 
Linux provides a nice `poweroff' command, but where is `poweron'?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Better .newsrc.eld formating
  2001-10-07  9:51       ` Kai Großjohann
@ 2001-10-07 12:27         ` Jérôme Marant
  0 siblings, 0 replies; 9+ messages in thread
From: Jérôme Marant @ 2001-10-07 12:27 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> jerome.marant@free.fr (Jérôme Marant) writes:
> 
> >   What is the way to use pp on file like .newsrc.eld?
> 
> There is some spot in the Gnus Lisp code which inserts the code into
> .newsrc.eld.  This spot should be changed to use pp.
> 
> But as others have mentioned, pp is slow, so the code given in this
> thread is probably better...  Sorry for not thinking of this originally.

  At least, I know what pp is now ;-)

  Cheers,

-- 
Jérôme Marant <jerome@marant.org>
              <jerome.marant@free.fr>



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-10-07 12:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-06 16:01 Better .newsrc.eld formating Jérôme Marant
2001-10-06 15:16 ` François Pinard
2001-10-06 19:25   ` Kai Großjohann
2001-10-06 21:40     ` François Pinard
2001-10-06 22:47     ` Jérôme Marant
2001-10-07  9:51       ` Kai Großjohann
2001-10-07 12:27         ` Jérôme Marant
2001-10-07  5:01     ` Randal L. Schwartz
2001-10-06 22:46   ` Jérôme Marant

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).