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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,gnus; Reported by: Nikolaus Rath <Nikolaus@HIDDEN>; Keywords: moreinfo; merged with #28331; dated Thu, 16 Jul 2015 00:15:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 21071 28331. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug reassigned from package 'gnus' to 'emacs,gnus'. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 21071 <at> debbugs.gnu.org:


Received: (at 21071) by debbugs.gnu.org; 26 Jan 2017 19:45:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 26 14:45:19 2017
Received: from localhost ([127.0.0.1]:46070 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cWpyx-0006AC-D5
	for submit <at> debbugs.gnu.org; Thu, 26 Jan 2017 14:45:19 -0500
Received: from hermes.netfonds.no ([80.91.224.195]:56931)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1cWpyv-0006A4-4T
 for 21071 <at> debbugs.gnu.org; Thu, 26 Jan 2017 14:45:17 -0500
Received: from 2.150.50.220.tmi.telenormobil.no ([2.150.50.220] helo=mouse)
 by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <larsi@HIDDEN>)
 id 1cWpys-000470-Fa; Thu, 26 Jan 2017 20:45:16 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: 21071 <at> debbugs.gnu.org
Subject: Re: bug#21071: Gnus message flags must be set before expiration,
 not afterwards
In-Reply-To: <87bncbu2un.fsf@HIDDEN> (Nikolaus Rath's message of
 "Tue, 06 Oct 2015 14:03:12 -0700")
Date: Thu, 26 Jan 2017 20:43:53 +0100
Message-ID: <87sho5obd2.fsf@HIDDEN>
References: <87mvyx2c20.fsf@HIDDEN>
 <twa8ux7y08.fsf@HIDDEN> <87fv4p2b9n.fsf@HIDDEN>
 <87bncbu2un.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software,
 running on the system "hermes.netfonds.no", 
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Nikolaus Rath <Nikolaus@HIDDEN> writes: > I did not find
 any specific guarantees on when > gnus-summary-prepare-exit-hook is called
 in the documentation, but that > doesn't mean that people are not relying
 on the current calling > order. Would a change like that nevertheless be
 acceptable? > > Alternatively,
 is what do people think about removing > gnus-summary-expire-articles
 from the default value of > gnus-summary-prepare-exit-hook and explicitly
 calling > gnus-summary-expire-articles from gnus-summary-exit? [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 21071
Cc: Nikolaus Rath <Nikolaus@HIDDEN>, ding <ding@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

Nikolaus Rath <Nikolaus@HIDDEN> writes:

> I did not find any specific guarantees on when
> gnus-summary-prepare-exit-hook is called in the documentation, but that
> doesn't mean that people are not relying on the current calling
> order. Would a change like that nevertheless be acceptable?
>
> Alternatively, is what do people think about removing
> gnus-summary-expire-articles from the default value of
> gnus-summary-prepare-exit-hook and explicitly calling
> gnus-summary-expire-articles from gnus-summary-exit?

I don't know why that function is in that hook by default; it seems
kinda messy.  But removing things from hooks isn't that easy since
people add things, or set values explicitly.

But we could call gnus-summary-expire-articles in the natural place
unless it's in that hook, perhaps?  And then remove it from the default
value and hope for the best.

Patches welcome.

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




Information forwarded to bugs@HIDDEN:
bug#21071; Package gnus. Full text available.

Message received at 21071 <at> debbugs.gnu.org:


Received: (at 21071) by debbugs.gnu.org; 6 Oct 2015 21:03:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 06 17:03:35 2015
Received: from localhost ([127.0.0.1]:57476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZjZOZ-00056q-El
	for submit <at> debbugs.gnu.org; Tue, 06 Oct 2015 17:03:35 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:49095)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <Nikolaus@HIDDEN>) id 1ZjZOF-00056J-Bn
 for 21071 <at> debbugs.gnu.org; Tue, 06 Oct 2015 17:03:34 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id B10DE204D9
 for <21071 <at> debbugs.gnu.org>; Tue,  6 Oct 2015 17:03:14 -0400 (EDT)
Received: from frontend1 ([10.202.2.160])
 by compute2.internal (MEProxy); Tue, 06 Oct 2015 17:03:14 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=y6XEi5MYFJBrXGs
 9mA2lSxRWl+s=; b=euBL9B6RK/Juhm/o2eEUxVKwo62lmokrIyhpEf3uZAY4od/
 VOGAsu0mO6Zy02VZ8OJ+0DXR8UatGzSn0HazccNEGMUvOp38uPG+0qwSZfE2P7N3
 +U/729oRSGbz9zaaEXgmmDj8gTnTu+XDRNXbs/MCBUtZvSaz6AjjSLCdd0s0=
X-Sasl-enc: H6o+8PnSFFFjfeLz+ubyOiVP42T2SIuQIKlethCWrt6S 1444165394
Received: from ebox.rath.org (ebox.rath.org [45.79.69.51])
 by mail.messagingengine.com (Postfix) with ESMTPA id 6632CC00022;
 Tue,  6 Oct 2015 17:03:14 -0400 (EDT)
Received: from vostro.rath.org (vostro [192.168.12.4])
 by ebox.rath.org (Postfix) with ESMTPS id 58B9CB281A;
 Tue,  6 Oct 2015 21:03:13 +0000 (UTC)
Received: by vostro.rath.org (Postfix, from userid 1000)
 id D9EF7F0CAB9; Tue,  6 Oct 2015 14:03:12 -0700 (PDT)
From: Nikolaus Rath <Nikolaus@HIDDEN>
To: 21071 <at> debbugs.gnu.org
Subject: Re: bug#21071: Gnus message flags must be set before expiration,
 not afterwards
References: <87mvyx2c20.fsf@HIDDEN>
 <twa8ux7y08.fsf@HIDDEN> <87fv4p2b9n.fsf@HIDDEN>
Mail-Copies-To: never
Mail-Followup-To: 21071 <at> debbugs.gnu.org, ding <ding@HIDDEN>, emacs-devel
 <emacs-devel@HIDDEN>
Date: Tue, 06 Oct 2015 14:03:12 -0700
In-Reply-To: <87fv4p2b9n.fsf@HIDDEN> (Nikolaus Rath's message of
 "Wed, 15 Jul 2015 17:31:48 -0700")
Message-ID: <87bncbu2un.fsf@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 21071
Cc: ding <ding@HIDDEN>, emacs-devel <emacs-devel@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hello,

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-

I did not find any specific guarantees on when
gnus-summary-prepare-exit-hook is called in the documentation, but that
doesn't mean that people are not relying on the current calling
order. Would a change like that nevertheless be acceptable?


Alternatively, is what do people think about removing
gnus-summary-expire-articles from the default value of
gnus-summary-prepare-exit-hook and explicitly calling
gnus-summary-expire-articles from gnus-summary-exit?


Best,
-Nikolaus

--=20
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2=
=AB




Information forwarded to bugs@HIDDEN:
bug#21071; Package gnus. Full text available.

Message received at 21071 <at> debbugs.gnu.org:


Received: (at 21071) by debbugs.gnu.org; 16 Jul 2015 00:22:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 20:22:12 2015
Received: from localhost ([127.0.0.1]:50469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZFWwC-0003Gk-0L
	for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 20:22:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52536)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1ZFWw6-0003G8-Kr
 for 21071 <at> debbugs.gnu.org; Wed, 15 Jul 2015 20:22:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1ZFWvw-00010l-Bj
 for 21071 <at> debbugs.gnu.org; Wed, 15 Jul 2015 20:21:57 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59452)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1ZFWvp-0000z6-E1; Wed, 15 Jul 2015 20:21:45 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1ZFWvn-0005bh-Cf; Wed, 15 Jul 2015 20:21:43 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Nikolaus Rath <Nikolaus@HIDDEN>
Subject: Re: bug#21071: Gnus message flags must be set before expiration,
 not afterwards
References: <87mvyx2c20.fsf@HIDDEN>
Mail-Followup-To: 21071 <at> debbugs.gnu.org
X-Spook: Tamaulipas Matamoros Hazardous Small Pox Central
X-Ran: cC]s5_o>cq3`:c+R?*W<gpQ|B\fs.H[d$1[(C^y\bJ;La%)td|wi^/h,z<O\krI^]xWD>L
X-Hue: cyan
X-Attribution: GM
Date: Wed, 15 Jul 2015 20:21:43 -0400
In-Reply-To: <87mvyx2c20.fsf@HIDDEN> (Nikolaus Rath's message of
 "Wed, 15 Jul 2015 17:14:47 -0700")
Message-ID: <twa8ux7y08.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 21071
Cc: ding@HIDDEN, 21071 <at> debbugs.gnu.org, emacs-devel@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: 21071 <at> debbugs.gnu.org
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)


You don't need to x-debbugs-cc every bug report you make to emacs-devel
and ding@HIDDEN, thus sending it to 3 (including gnus-bug) separate
mailing lists. Just the bug list is fine.




Information forwarded to bugs@HIDDEN:
bug#21071; Package gnus. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Jul 2015 00:14:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 20:14:52 2015
Received: from localhost ([127.0.0.1]:50462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZFWpA-00035W-4c
	for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 20:14:52 -0400
Received: from ebox.rath.org ([23.92.25.96]:49797)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <Nikolaus@HIDDEN>) id 1ZFWp8-00035O-Jp
 for submit <at> debbugs.gnu.org; Wed, 15 Jul 2015 20:14:51 -0400
Received: from vostro ([192.168.12.4] helo=vostro.rath.org)
 by ebox.rath.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256)
 (Exim 4.80) (envelope-from <Nikolaus@HIDDEN>) id 1ZFWp6-0004xE-GB
 for submit <at> debbugs.gnu.org; Thu, 16 Jul 2015 00:14:48 +0000
Received: by vostro.rath.org (Postfix, from userid 1000)
 id E995DEC65B0; Wed, 15 Jul 2015 17:14:47 -0700 (PDT)
From: Nikolaus Rath <Nikolaus@HIDDEN>
To: submit <at> debbugs.gnu.org
Subject: Gnus message flags must be set before expiration, not afterwards
X-Debbugs-CC: ding@HIDDEN, emacs-devel@HIDDEN
Date: Wed, 15 Jul 2015 17:14:47 -0700
Message-ID: <87mvyx2c20.fsf@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

Package: gnus

Hello,

If you perform the following steps:

1. Enter an nnimap group with expiry-target set to another nnimap group,
   and expiry-wait 'immediate.
2. Select an unread article, mark it as read
3. Also mark the article for expiry
4. Leave the group

.. then the article will be in the target group, but it will still be
unread.

As far as I can tell, this is because Gnus is running
nn*-request-expire-articles *before* nn*-request-set-mark rather than
the other way around.


Best,
-Nikolaus


--=20
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2=
=AB




Acknowledgement sent to Nikolaus Rath <Nikolaus@HIDDEN>:
New bug report received and forwarded. Copy sent to ding@HIDDEN, emacs-devel@HIDDEN, bugs@HIDDEN. Full text available.
Report forwarded to ding@HIDDEN, emacs-devel@HIDDEN, bugs@HIDDEN:
bug#21071; Package gnus. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 12 Apr 2018 16:45:01 UTC

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