I'm not sure what the policy is for fixing bugs in "external"
packages.
I submitted the following to bugs(a)gnus.org. Should I submit the
following to xemacs-patches as well so you can fix
xemacs-packages/lisp/gnus/nnmail.el until the upstream Gnus is fixed?
The problem is that the fifth argument to replace-match means
something very different in Emacs than in XEmacs.
(replace-match NEWTEXT &optional FIXEDCASE LITERAL STRING SUBEXP)
The optional fifth argument SUBEXP specifies a subexpression of
the match. It says to replace just that subexpression instead of
the whole match. This is useful only after a regular expression
search or match since only regular expressions have distinguished
subexpressions.
Thanks,
-Mark
To: bugs(a)gnus.org (The Gnus Bugfixing Girls + Boys)
Subject: nnmail-fix-eudora-headers regexp
From: Mark Thomas <mthomas(a)edrc.cmu.edu>
Message-ID: <wf1hextmraf.fsf(a)svelte.home>
Date: 06 Jun 2001 14:00:19 -0400
Lines: 183
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)
Gnus v5.8.8
XEmacs 21.1 (patch 14) "Cuyahoga Valley" [Lucid] (i686-pc-linux, Mule) of Sun
Apr 8 2001 on svelte.home
200
vagu.edrc.cmu.edu NNTP[auth] server version 0.9n(dnntp) ready at Wed Jun 6 12:28:17
2001 (canpost)
I realize my Gnus is not the bleeding edge, so this may have been
fixed in the oort series.
In nnmail-fix-eudora-headers, the lines to fix Eudora's In-Reply-To:
header do not work because the optional fifth argument to
replace-match is different between Emacs and XEmacs.
The following patch fixes it.
2001-06-06 Mark Thomas <mthomas(a)edrc.cmu.edu>
* nnmail.el (nnmail-fix-eudora-headers): Change the In-Reply-To
fix so it works with XEmacs.
--- nnmail.el.orig Thu Jan 4 00:16:09 2001
+++ nnmail.el Wed Jun 6 13:39:36 2001
@@ -1110,8 +1110,8 @@
(beginning-of-line)
(insert "X-Gnus-Broken-Eudora-"))
(goto-char (point-min))
- (when (re-search-forward "^In-Reply-To:[^\n]+\\(\n[ \t]+\\)" nil t)
- (replace-match "" t t nil 1))))
+ (when (re-search-forward "^\\(In-Reply-To:[^\n]+\\)\n[ \t]+" nil t)
+ (replace-match "\\1" t))))
(custom-add-option 'nnmail-prepare-incoming-header-hook
'nnmail-fix-eudora-headers)