Gnus development mailing list
 help / color / mirror / Atom feed
From: Samuel Padgett <spadgett1@nc.rr.com>
Cc: Ted Zlatanov <tzz@northernlight.com>, ding@gnus.org
Subject: Re: possible bug? or feature? with slurping DOS files under Unix
Date: Mon, 12 Nov 2001 22:14:53 -0500	[thread overview]
Message-ID: <20011112221453.A30315@harpo.homeip.net> (raw)
In-Reply-To: <ilur8r3r9mg.fsf@dhcp128.extundo.com>

Simon Josefsson <jas@extundo.com> writes:

> I remember patching something recently to work around that
> problem, but I don't recall what exactly or if it was committed.

I think that was for me.

Sam


2001-09-15  Simon Josefsson  <jas@extundo.com>

	* nnml.el (nnml-parse-head): Handle CRLF files.
	(nnml-generate-nov-file): Ditto.
	(nnml-retrieve-headers): Ditto.

Index: nnml.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnml.el,v
retrieving revision 6.25
diff -u -u -w -u -w -r6.25 nnml.el
--- nnml.el	2001/09/08 20:55:16	6.25
+++ nnml.el	2001/09/15 21:17:19
@@ -157,7 +157,7 @@
 		(setq beg (point))
 		(nnheader-insert-head file)
 		(goto-char beg)
-		(if (search-forward "\n\n" nil t)
+		(if (re-search-forward "\n\r?\n" nil t)
 		    (forward-char -1)
 		  (goto-char (point-max))
 		  (insert "\n\n"))
@@ -713,13 +713,15 @@
       (unless (zerop (buffer-size))
 	(narrow-to-region
 	 (goto-char (point-min))
-	 (if (search-forward "\n\n" nil t) (1- (point))
(point-max))))
+	 (if (re-search-forward "\n\r?\n" nil t) (1- (point))
(point-max))))
       ;; Fold continuation lines.
       (goto-char (point-min))
       (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
 	(replace-match " " t t))
       ;; Remove any tabs; they are too confusing.
       (subst-char-in-region (point-min) (point-max) ?\t ? )
+      ;; Remove any ^M's; they are too confusing.
+      (subst-char-in-region (point-min) (point-max) ?\r ? )
       (let ((headers (nnheader-parse-head t)))
 	(mail-header-set-chars headers chars)
 	(mail-header-set-number headers number)
@@ -838,7 +840,7 @@
 	  (narrow-to-region
 	   (goto-char (point-min))
 	   (progn
-	     (search-forward "\n\n" nil t)
+	     (re-search-forward "\n\r?\n" nil t)
 	     (setq chars (- (point-max) (point)))
 	     (max 1 (1- (point)))))
 	  (unless (zerop (buffer-size))



  reply	other threads:[~2001-11-13  3:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-12 19:00 Ted Zlatanov
2001-11-12 20:56 ` Simon Josefsson
2001-11-13  3:14   ` Samuel Padgett [this message]
2001-11-13  9:40     ` Simon Josefsson
2001-11-13 17:24       ` Samuel Padgett
2001-11-13 17:34       ` Ted Zlatanov

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=20011112221453.A30315@harpo.homeip.net \
    --to=spadgett1@nc.rr.com \
    --cc=ding@gnus.org \
    --cc=tzz@northernlight.com \
    /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).