GNU bug report logs -
#12375
Broken matching of regexps in fancy splitting
Previous Next
Reported by: jathd <jathdr <at> gmail.com>
Date: Fri, 7 Sep 2012 05:31:02 UTC
Severity: normal
Tags: fixed
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 12375 <at> debbugs.gnu.org (full text, mbox):
jathd <jathdr <at> gmail.com> writes:
> I'm not sure if this counts as a bug, but it's certainly an unexpected
> behaviour (to me) to which I have found no reference in the manual.
>
> The situation:
>
> * In .gnus.el, specify splitting with
>
> (setq nnmail-split-methods 'nnmail-split-fancy)
> (setq nnmail-split-fancy
> '(to "\\(\\w+\\)-devel@.*" "list.devel.\\1"))
>
> * Visit a message whose only relevant header (relative to the "to"
> abbreviation) is
>
> To: Batteries-devel <batteries-devel <at> lists.forge.ocamlcore.org>
>
> * Press B q and read the message in the minibuffer.
>
> Current message: This message would go to list.devel.s
> Expected message: This message would go to list.devel.batteries
>
> I believe the problem comes from the way the regexp value I gave (the
> VALUE field in the split) is matched against the contents of the header,
> as defined in the function nnmail-split-it in nnmail.el. Once the
> interesting bit of the header has been found, the match is done with
> re-search-backward, which explains why the "\\w+" bit only matches the
> last letter of "batteries".
Do you have `nnmail-split-fancy-match-partial-words' set? If not, the
splitting machinery will put a \\< in front of the regexp, leading to
"batteries" being matched.
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen
This bug report was last modified 8 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.