emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: undigestify-rmail-message in emacs 22.1 doesn't spli


From: Glenn Morris
Subject: Re: address@hidden: undigestify-rmail-message in emacs 22.1 doesn't split a digest]
Date: Tue, 14 Aug 2007 18:00:03 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Richard Stallman wrote:

> Would someone please fix this, then ack?
> Please fix it in Emacs 22 as well as the trunk.

I will install the following fix. As well as a small bug in
rmail-digest-rfc1153, the problem is that GNU Mailman is deliberately
producing non-compliant digests (see comment below). So
rmail-digest-parse-rfc1153sloppy needs to be sloppier (as it was in
Emacs 21).


*** undigest.el 26 Jul 2007 05:27:14 -0000      1.41
--- undigest.el 14 Aug 2007 21:52:40 -0000
***************
*** 93,99 ****
   (rmail-digest-rfc1153
    "^-\\{55,\\}\n\n"
    "^\n-\\{27,\\}\n\n"
!   "^\n-\\{27,\\}\n\nEnd of"))
  
  (defun rmail-digest-rfc1153 (prolog-sep message-sep trailer-sep)
    (goto-char (point-min))
--- 93,107 ----
   (rmail-digest-rfc1153
    "^-\\{55,\\}\n\n"
    "^\n-\\{27,\\}\n\n"
!   ;; GNU mailman knowingly (see comment at line 353 of ToDigest.py in
!   ;; mailman source) produces non-conformant rfc 1153 digests, in that
!   ;; the trailer contains a "digest footer" like this:
!   ;; _______________________________________________ <one or more
!   ;; lines of list blurb>
!   ;;
!   ;; End of Foo Digest...
!   ;; **************************************
!   "^\nEnd of"))
  
  (defun rmail-digest-rfc1153 (prolog-sep message-sep trailer-sep)
    (goto-char (point-min))
***************
*** 104,110 ****
          separator result)
        (move-marker start (match-beginning 0))
        (move-marker end (match-end 0))
!       (setq result (cons (copy-marker start) (copy-marker end t)))
        (when (re-search-forward message-sep nil t)
        ;; Ok, at least one message separator found
        (setq separator (match-string 0))
--- 112,118 ----
          separator result)
        (move-marker start (match-beginning 0))
        (move-marker end (match-end 0))
!       (setq result (list (cons (copy-marker start) (copy-marker end t))))
        (when (re-search-forward message-sep nil t)
        ;; Ok, at least one message separator found
        (setq separator (match-string 0))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]