GNU bug report logs - #53877
29.0.50; [PATCH] async Gnus/nnml

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Tue, 8 Feb 2022 14:23:01 UTC

Severity: wishlist

Found in version 29.0.50

Full log


View this message in rfc822 format

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 53877 <at> debbugs.gnu.org
Subject: bug#53877: 29.0.50; [PATCH] async Gnus/nnml
Date: Wed, 09 Feb 2022 10:42:25 +0100
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.