Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Mike Kupfer <m.kupfer@acm.org>
Cc: ding@gnus.org
Subject: Re: messages not being marked as read on IMAP server
Date: Sat, 06 Feb 2016 16:41:59 +1100	[thread overview]
Message-ID: <87si16qtso.fsf@gnus.org> (raw)
In-Reply-To: <28176.1453756739@allegro.localdomain> (Mike Kupfer's message of "Mon, 25 Jan 2016 13:18:59 -0800")

Mike Kupfer <m.kupfer@acm.org> 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



  reply	other threads:[~2016-02-06  5:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 21:18 Mike Kupfer
2016-02-06  5:41 ` Lars Ingebrigtsen [this message]
2016-02-06 22:58   ` Mike Kupfer
2016-02-07  2:13     ` Lars Ingebrigtsen
2016-02-07 22:47       ` Mike Kupfer

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=87si16qtso.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=ding@gnus.org \
    --cc=m.kupfer@acm.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).