From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86709 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: messages not being marked as read on IMAP server Date: Sat, 06 Feb 2016 16:41:59 +1100 Message-ID: <87si16qtso.fsf@gnus.org> References: <28176.1453756739@allegro.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454737392 15486 80.91.229.3 (6 Feb 2016 05:43:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Feb 2016 05:43:12 +0000 (UTC) Cc: ding@gnus.org To: Mike Kupfer Original-X-From: ding-owner+M34935@lists.math.uh.edu Sat Feb 06 06:43:00 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aRve7-0006hx-Jv for ding-account@gmane.org; Sat, 06 Feb 2016 06:42:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aRvdo-0002De-6K; Fri, 05 Feb 2016 23:42:40 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aRvdl-0002D2-Qs for ding@lists.math.uh.edu; Fri, 05 Feb 2016 23:42:37 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aRvdk-0007KK-3H for ding@lists.math.uh.edu; Fri, 05 Feb 2016 23:42:37 -0600 Original-Received: from hermes.netfonds.no ([80.91.224.195]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1aRvdi-0001b5-Nn for ding@gnus.org; Sat, 06 Feb 2016 06:42:34 +0100 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aRvdI-0006tu-DO; Sat, 06 Feb 2016 06:42:09 +0100 In-Reply-To: <28176.1453756739@allegro.localdomain> (Mike Kupfer's message of "Mon, 25 Jan 2016 13:18:59 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) X-MailScanner-ID: 1aRvdI-0006tu-DO MailScanner-NULL-Check: 1455342129.42239@eo47YcTlO0xNcRwxHK9jfA X-Spam-Status: No X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86709 Archived-At: Mike Kupfer writes: > I have a couple different systems that I use to connect to an IMAP > server. I've noticed that messages that I had read--or at least marked > as read--using Gnus on system A sometimes show up as unread using Gnus > on system B. I've finally tracked it down to this scenario: > > - a message is unread and flagged (ticked) on the IMAP server. Gnus > shows it and the next message in the summary buffer as ticked. (I'm > not sure that status of the second message is critical for reproducing > the problem, but it seems to help.) > - in the Gnus summary buffer, I type "d" for the first message. The > message is marked "r" in the summary buffer, as expected. > - I exit the summary buffer and type "s" in the Group buffer > - I check the folder using Thunderbird; it shows the first message as no > longer flagged, but it's still shown as unread. > > I expect the first message to be shown as read ("seen"). Hm... I think "unread and flagged" is something that Gnus isn't expecting. It thinks that everything that's ticked (i.e. flagged) is also read, which explains why it's not pushing the readedness change to the IMAP server (because it doesn't think that the readedness has changed). I think. > With the debugger I captured the following stack trace while exiting the > summary buffer: > > Debugger entered--entering a function: > * nnimap-send-command("UID STORE %s %sFLAGS.SILENT (%s)" "257948" "-" "\\Flagged") > nnimap-request-set-mark("INBOX" (((257948) del (tick))) "beehive") > gnus-request-set-mark("nnimap+beehive:INBOX" (((257948) del (tick)))) > gnus-update-marks() > gnus-summary-update-info() > gnus-summary-exit() > call-interactively(gnus-summary-exit nil nil) > command-execute(gnus-summary-exit) > > I didn't notice any calls to set the Seen flag. Yup. I'm not quite sure what the right approach to fixing this is... hm... > I tried figuring out what's going on in gnus-update-marks, but it's a > bit confusing, because there's both a gnus-newsgroup-seen list and a > gnus-newsgroup-unseen list. Though this bit of code seems odd: > > (when (eq (cdr type) 'seen) > (setq list (gnus-range-add list gnus-newsgroup-unseen))) Yeah, that seems awfully weird, especially since the unseen list is computed as the inverse of the seen list... (defun gnus-compute-unseen-list () ;; The `seen' marks are treated specially. (if (not gnus-newsgroup-seen) (setq gnus-newsgroup-unseen gnus-newsgroup-articles) (setq gnus-newsgroup-unseen (gnus-inverse-list-range-intersection gnus-newsgroup-articles gnus-newsgroup-seen)))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no