From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88798 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: bug#21071: Gnus message flags must be set before expiration, not afterwards Date: Fri, 27 Sep 2019 18:04:53 +0200 Message-ID: <871rw1k9ne.fsf@gnus.org> References: <87mvyx2c20.fsf@vostro.rath.org> <87fv4p2b9n.fsf@vostro.rath.org> <87bncbu2un.fsf@vostro.rath.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="170865"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: ding To: 21071@debbugs.gnu.org Original-X-From: ding-owner+M37002@lists.math.uh.edu Fri Sep 27 18:05:42 2019 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDskX-000iKj-L7 for ding-account@gmane.org; Fri, 27 Sep 2019 18:05:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92.2) (envelope-from ) id 1iDsjz-0000Fe-RO; Fri, 27 Sep 2019 11:05:07 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.2) (envelope-from ) id 1iDsjx-0000Cp-2z for ding@lists.math.uh.edu; Fri, 27 Sep 2019 11:05:05 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) (envelope-from ) id 1iDsjv-000627-38 for ding@lists.math.uh.edu; Fri, 27 Sep 2019 11:05:04 -0500 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iDsjl-0003XI-LC; Fri, 27 Sep 2019 18:04:59 +0200 In-Reply-To: <87bncbu2un.fsf@vostro.rath.org> (Nikolaus Rath's message of "Tue, 06 Oct 2015 14:03:12 -0700") List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88798 Archived-At: Nikolaus Rath 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