From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86209 Path: news.gmane.org!not-for-mail From: Nikolaus Rath Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: bug#21071: Gnus message flags must be set before expiration, not afterwards Date: Tue, 06 Oct 2015 14:03:12 -0700 Message-ID: <87bncbu2un.fsf@vostro.rath.org> References: <87mvyx2c20.fsf@vostro.rath.org> <87fv4p2b9n.fsf@vostro.rath.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1444165428 14014 80.91.229.3 (6 Oct 2015 21:03:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2015 21:03:48 +0000 (UTC) Cc: ding , emacs-devel To: 21071@debbugs.gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 06 23:03:36 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZjZOZ-0005wj-1h for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2015 23:03:35 +0200 Original-Received: from localhost ([::1]:54014 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZOY-0001Wr-B1 for ged-emacs-devel@m.gmane.org; Tue, 06 Oct 2015 17:03:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZOM-0001Wh-9i for emacs-devel@gnu.org; Tue, 06 Oct 2015 17:03:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjZOI-0002pH-NV for emacs-devel@gnu.org; Tue, 06 Oct 2015 17:03:22 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjZOI-0002nA-Kp for emacs-devel@gnu.org; Tue, 06 Oct 2015 17:03:18 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id AC802204C5 for ; Tue, 6 Oct 2015 17:03:14 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute6.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 Original-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) Original-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) Original-Received: by vostro.rath.org (Postfix, from userid 1000) id D9EF7F0CAB9; Tue, 6 Oct 2015 14:03:12 -0700 (PDT) Mail-Copies-To: never Mail-Followup-To: 21071@debbugs.gnu.org, ding , emacs-devel In-Reply-To: <87fv4p2b9n.fsf@vostro.rath.org> (Nikolaus Rath's message of "Wed, 15 Jul 2015 17:31:48 -0700") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:191021 gmane.emacs.gnus.general:86209 Archived-At: 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