* expirable mark lost in nnfolder groups
@ 2010-12-21 11:09 Sven Joachim
2010-12-21 16:00 ` Sven Joachim
0 siblings, 1 reply; 3+ messages in thread
From: Sven Joachim @ 2010-12-21 11:09 UTC (permalink / raw)
To: ding
Hi,
expiration seems to be broken (at least) in nnfolder groups. I can mark
an article as expirable (or set auto-expire to t in the group
parameters), but upon leaving and re-entering the group, all expirable
marks are lost. :-( Anyone else seeing this?
Regards,
Sven
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: expirable mark lost in nnfolder groups
2010-12-21 11:09 expirable mark lost in nnfolder groups Sven Joachim
@ 2010-12-21 16:00 ` Sven Joachim
2011-01-02 6:51 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Sven Joachim @ 2010-12-21 16:00 UTC (permalink / raw)
To: ding
On 2010-12-21 12:09 +0100, Sven Joachim wrote:
> Hi,
>
> expiration seems to be broken (at least) in nnfolder groups. I can mark
> an article as expirable (or set auto-expire to t in the group
> parameters), but upon leaving and re-entering the group, all expirable
> marks are lost. :-( Anyone else seeing this?
Bisecting shows that commit 06eeefe0 is the first "bad" one, fully cited
(with "git show") below.
Sven
commit 06eeefe0c892fd77f7a79493fa4f1db0f8058761
Author: Lars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Date: Thu Dec 16 18:58:19 2010 +0100
Clear up nnml expiry target performance regressions.
Fix previous fix by having nnfolder save all its buffers
explicitly.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9036447..bac3f9e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * nnfolder.el (nnfolder-save-all-buffers): Refactor out into its own
+ function.
+ (nnfolder-request-expire-articles): Save all the buffers after doing
+ expiry.
+
+ * nnmail.el (nnmail-expiry-target-group): Revert the "all articles are
+ the last article", since that led to serious performance regressions
+ when expiring nnml groups.
+
2010-12-16 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el: Improve customizations.
diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el
index 5de8653..f0a21c5 100644
--- a/lisp/nnfolder.el
+++ b/lisp/nnfolder.el
@@ -322,20 +322,20 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(when nnfolder-get-new-mail
(nnfolder-possibly-change-group group server)
(nnmail-get-new-mail
- 'nnfolder
- (lambda ()
- (let ((bufs nnfolder-buffer-alist))
- (save-excursion
- (while bufs
- (if (not (gnus-buffer-live-p (nth 1 (car bufs))))
- (setq nnfolder-buffer-alist
- (delq (car bufs) nnfolder-buffer-alist))
- (set-buffer (nth 1 (car bufs)))
- (nnfolder-save-buffer)
- (kill-buffer (current-buffer)))
- (setq bufs (cdr bufs))))))
- nnfolder-directory
- group)))
+ 'nnfolder 'nnfolder-save-all-buffers
+ nnfolder-directory group)))
+
+(defun nnfolder-save-all-buffers ()
+ (let ((bufs nnfolder-buffer-alist))
+ (save-excursion
+ (while bufs
+ (if (not (gnus-buffer-live-p (nth 1 (car bufs))))
+ (setq nnfolder-buffer-alist
+ (delq (car bufs) nnfolder-buffer-alist))
+ (set-buffer (nth 1 (car bufs)))
+ (nnfolder-save-buffer)
+ (kill-buffer (current-buffer)))
+ (setq bufs (cdr bufs))))))
;; Don't close the buffer if we're not shutting down the server. This way,
;; we can keep the buffer in the group buffer cache, and not have to grovel
@@ -488,7 +488,8 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(nnfolder-save-buffer)
(nnfolder-adjust-min-active newsgroup)
(nnfolder-save-active nnfolder-group-alist nnfolder-active-file)
- (gnus-sorted-difference articles (nreverse deleted-articles)))))
+ (gnus-sorted-difference articles (nreverse deleted-articles)))
+ (nnfolder-save-all-buffers)))
(deffoo nnfolder-request-move-article (article group server accept-form
&optional last move-is-internal)
diff --git a/lisp/nnmail.el b/lisp/nnmail.el
index 06b464c..c86e96b 100644
--- a/lisp/nnmail.el
+++ b/lisp/nnmail.el
@@ -1915,7 +1915,7 @@ If TIME is nil, then return the cutoff time for oldness instead."
(unless (eq target 'delete)
(when (or (gnus-request-group target)
(gnus-request-create-group target))
- (let ((group-art (gnus-request-accept-article target nil t t)))
+ (let ((group-art (gnus-request-accept-article target nil nil t)))
(when (and (consp group-art)
(cdr group-art))
(gnus-group-mark-article-read target (cdr group-art))))))))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: expirable mark lost in nnfolder groups
2010-12-21 16:00 ` Sven Joachim
@ 2011-01-02 6:51 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-01-02 6:51 UTC (permalink / raw)
To: ding
Sven Joachim <svenjoac@gmx.de> writes:
>> expiration seems to be broken (at least) in nnfolder groups. I can mark
>> an article as expirable (or set auto-expire to t in the group
>> parameters), but upon leaving and re-entering the group, all expirable
>> marks are lost. :-( Anyone else seeing this?
>
> Bisecting shows that commit 06eeefe0 is the first "bad" one, fully cited
> (with "git show") below.
[...]
> Clear up nnml expiry target performance regressions.
>
> Fix previous fix by having nnfolder save all its buffers
> explicitly.
Hm. But the patch in question doesn't deal with marks at all -- it just
saves buffers after expiry. So I don't understand that much...
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-02 6:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21 11:09 expirable mark lost in nnfolder groups Sven Joachim
2010-12-21 16:00 ` Sven Joachim
2011-01-02 6:51 ` Lars Magne Ingebrigtsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).