GNU bug report logs -
#53877
29.0.50; [PATCH] async Gnus/nnml
Previous Next
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
>
>> -(defvar nnmail-article-buffer " *nnmail incoming*"
>> - "The buffer used for splitting incoming mails.")
>
> [...]
>
>> - (with-current-buffer (gnus-get-buffer-create nnmail-article-buffer)
>> - (erase-buffer)
>
> No, this would break lots of Gnus installations -- people have splitting
> rules that go
>
> (: split-on-body)
>
> where that function looks into nnmail-article-buffer to do whatever they
> want.
I've just test this with my patch in place:
--8<---------------cut here---------------start------------->8---
(defun foo-split ()
(save-excursion
(save-restriction
(widen)
(goto-char (point-min))
(when (re-search-forward "booga" nil t)
"booga"))))
;; Mail splitting (XXX order is important)
(setq nnmail-split-methods 'nnmail-split-fancy
nnmail-split-fancy
`(| (: foo-split)
"elsewhere"))
--8<---------------cut here---------------end--------------->8---
…and it works as expected: splitting a mail containing "booga" to
"booga". `nnmail-split-it' does not seems to have a reference to
nnmail-buffer-article and just works on the current buffer:
--8<---------------cut here---------------start------------->8---
;; Builtin : operation.
((eq (car split) ':)
(nnmail-log-split split)
(nnmail-split-it (save-excursion (eval (cdr split) t))))
--8<---------------cut here---------------end--------------->8---
--
Manuel Giraud
This bug report was last modified 2 years and 281 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.