From: Lars Ingebrigtsen <larsi@gnus.org>
To: 21071@debbugs.gnu.org
Cc: ding <ding@gnus.org>
Subject: bug#21071: Gnus message flags must be set before expiration, not afterwards
Date: Fri, 27 Sep 2019 18:04:53 +0200 [thread overview]
Message-ID: <871rw1k9ne.fsf__16470.4543467209$1569602798$gmane$org@gnus.org> (raw)
In-Reply-To: <87bncbu2un.fsf@vostro.rath.org> (Nikolaus Rath's message of "Tue, 06 Oct 2015 14:03:12 -0700")
Nikolaus Rath <Nikolaus@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
prev parent reply other threads:[~2019-09-27 16:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 0:14 bug#21071: Gnus message flags must be set before expiration, not afterwards Nikolaus Rath
2015-07-16 0:21 ` Glenn Morris
[not found] ` <87fv4p2b9n.fsf@vostro.rath.org>
2015-10-06 21:03 ` Nikolaus Rath
2019-09-27 16:04 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='871rw1k9ne.fsf__16470.4543467209$1569602798$gmane$org@gnus.org' \
--to=larsi@gnus.org \
--cc=21071@debbugs.gnu.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.