GNU bug report logs - #21071
Gnus message flags must be set before expiration, not afterwards

Previous Next

Packages: gnus, emacs;

Reported by: Nikolaus Rath <Nikolaus <at> rath.org>

Date: Thu, 16 Jul 2015 00:15:02 UTC

Severity: minor

Tags: fixed

Merged with 28331

Found in versions 5.130014, 5.13

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #33 received at 21071 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 21071 <at> debbugs.gnu.org
Cc: ding <ding <at> gnus.org>
Subject: Re: bug#21071: Gnus message flags must be set before expiration,
 not afterwards
Date: Fri, 27 Sep 2019 18:04:53 +0200
Nikolaus Rath <Nikolaus <at> rath.org> writes:

> This issue is caused by article expiry being done in
> gnus-summary-prepare-exit-hook. gnus-summary-exit calls this hook before
> calling gnus-update-read-articles (which sets the read mark).
>
> A trivial patch is to invert the order:
>
> #V+
> diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
> index 37a707e..56406d0 100644
> --- a/lisp/gnus-sum.el
> +++ b/lisp/gnus-sum.el
> @@ -7252,7 +7252,6 @@ If FORCE (the prefix), also save the .newsrc file(s)."
>         (gnus-score-adaptive))
>        (when gnus-use-scoring
>         (gnus-score-save)))
> -    (gnus-run-hooks 'gnus-summary-prepare-exit-hook)
>      (when gnus-use-cache
>        (gnus-cache-possibly-remove-articles)
>        (gnus-cache-save-buffers))
> @@ -7269,6 +7268,7 @@ If FORCE (the prefix), also save the .newsrc file(s)."
>      (unless quit-config
>        (gnus-run-hooks 'gnus-exit-group-hook)
>        (gnus-summary-update-info))
> +    (gnus-run-hooks 'gnus-summary-prepare-exit-hook)
>      (gnus-close-group group)
>      ;; Make sure where we were, and go to next newsgroup.
>      (when (buffer-live-p (get-buffer gnus-group-buffer))
> #V-

Staring at the change some more, I think it should be safe-ish.  Nothing
really visible that should affect the functions in that hook happens
between the old and new place (except the marks stuff), so I've applied
it.

If this leads to regressions in somebody's setup, we'll have to revert
it, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.