[comp.text.tex] Can't undigest UKTeX digest

schoett@informatik.tu-muenchen.dbp.de (Oliver Schoett) (09/04/90)

UKTeX V90 #27:

 > This issue edited by:
 >                  David Osborne (University of Nottingham)
 >                    <d.osborne@uk.ac.nott.clan>

 > 		       E d i t o r ' s  N o t e
 > 
 > I have changed the format of this issue to allow the use of digest
 > `bursting' software which can break down a digest into individual
 > messages.

 > - ------------------------------------------------------------

I still can't undigest the UKTeX digest (I use GNUS' ^D =
gnus-Subject-rmail-digest).  The reason seems to be that the separator
line does not start with a long string of dashes, but has a blank in
the second column (see above).  I've seen digest-producing programs do
this when the material in a digest contains strings of dashes -- maybe
the digest got wrapped one time too many?


Oliver Schoett	 Institut f\"ur Informatik, Technische Univ. M\"unchen
		 Postf. 202420, 8000 M\"unchen 2, Fed. Rep. of Germany
schoett@informatik.tu-muenchen.dbp.de		      +49 89 2105 2390
schoett%informatik.....de@  {relay.cs.net, unido.uucp, dfngate.bitnet}

ralph@laas.fr (Ralph P. Sobek) (09/08/90)

I also have had problems un-digesting UKTeX Digests.  As an aside, is
there a norm for Electronic Digests?  TeXHax and Risks both seem to
undigest quite nicely, but not 100% either (with GNUS).  

I have not seen the following posting, so I don't know if my software
handles the new UKTeX format.

 > I have changed the format of this issue to allow the use of digest
 > `bursting' software which can break down a digest into individual
 > messages.

Of course, if it doesn't I'd love to hear about it.  I just wrote a
simple GNUS emacs function to cleanup the UKTeX Digests before GNUS
would undigestify them.  So here it is.

I add the following value to the gnus-Select-digest-hook variable:

	 (if (and (string-equal "comp.text.tex" gnus-newsgroup-name)
		  (string-match "^UKTeX Digest"
				(gnus-header-subject gnus-current-headers)))
	     (gnus-Article-fixup-UKTeX))

and here's my fixer-upper function:

(defun gnus-Article-fixup-UKTeX ()
  (save-excursion
    (let ((count 3))
      (while (> count 0)
	(setq count (1- count))
	(re-search-forward (concat "^" (make-string 55 ?-) "-*\n*"))
	(replace-match (concat (make-string 77 ?+) "\n"))))
    (re-search-forward (concat "^" (make-string 55 ?-) "-*\n*"))
    (save-restriction
      (narrow-to-region (point) (point-max))
      (goto-char (point-max))
      (re-search-backward (concat "^" (make-string 55 ?-) "-*\n*"))
      (while (re-search-backward
	      (concat "^" (make-string 55 ?-) "-*\n*")
	      nil t)
	(replace-match (concat (make-string 77 ?+) "\n")))))
	
  (while (re-search-forward
	  (concat "\n\n" (make-string 27 ?=) "=*\n*")
	  nil t)
    (replace-match (concat "\n\n" (make-string 27 ?-) "\n")))
  (goto-char (point-max))
  (insert "\nEnd of UKTeX Digest\n*********\n-----\n"))

--
Ralph P. Sobek			  Disclaimer: The above ruminations are my own.
ralph@laas.fr				   Addresses are ordered by importance.
ralph@laas.uucp, or ...!uunet!laas!ralph		
If all else fails, try:				      sobek@eclair.Berkeley.EDU
===============================================================================
Reliable software should kill people reliably! -Andy Mickel, Pascal News #13,78