Gnus development mailing list
 help / color / mirror / Atom feed
* Strange article sorting from Gmail
@ 2023-10-18 20:04 Bob Newell
  2023-10-19 19:23 ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Newell @ 2023-10-18 20:04 UTC (permalink / raw)
  To: ding

Aloha everyone,

I came across a strange thing with gnus and gmail.  I've been
using gnus to fetch mail directly from gmail for years.
Things work as expected at the 99% level, at times with some
effort.

However something changed two days ago that I can't
understand.  It was only in my gmail "Sent Mail" folder and
nowhere else.

Everything was fine until that morning Sent Mail, when
fetched, showed a few recent sent messages, and then skipped
over several thousand of them and showed messages from 2021 on
back.  Now, if I did /o and told it to fetch all 28,000 or so
headers, everything would then show up.

I checked the usual suspects.  I was using (display . all).  I
was using gnus-thread-sort-by-most-recent-date in the variable
gnus-thread-sort-function.  I tried adding (not
gnus-thread-sort-by-number) to no avail.

Further research appeared to indicate that gnus fetches by the
IMAP server's ID number, and the numbers on the gmail server
appeared to have all of a sudden gotten out of sync with the
email dates.  So if I fetched just a few headers, I would get
the odd behavior described.  If I fetched all the headers,
gnus would be able to sort all the mail in proper date order.
In other words gnus couldn't sort headers it didn't have.

There's nothing to do about this as it apparently is some sort
of gmail problem.  On the web interface, of course, everything
sorts as expected, but that's not what I care to use.

What I did was move a few thousand emails out of Sent Mail and
into the gmail archive.  In effect what this does is remove
the Sent Mail label.  The mail still remains in gmails All
Mail label.  Eventually I got to something that was more or
less date sequential.

The reason I'm posting here is to ask if anyone else has seen
strange things like this when using gnus and gmail.  I'm not
asking for a solution as it appears there is none, at least
not on the gnus side.

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange article sorting from Gmail
  2023-10-18 20:04 Strange article sorting from Gmail Bob Newell
@ 2023-10-19 19:23 ` Eric Abrahamsen
  2023-10-19 21:54   ` Bob Newell
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2023-10-19 19:23 UTC (permalink / raw)
  To: ding

Bob Newell <bobnewell@bobnewell.net> writes:

> Aloha everyone,
>
> I came across a strange thing with gnus and gmail.  I've been
> using gnus to fetch mail directly from gmail for years.
> Things work as expected at the 99% level, at times with some
> effort.
>
> However something changed two days ago that I can't
> understand.  It was only in my gmail "Sent Mail" folder and
> nowhere else.
>
> Everything was fine until that morning Sent Mail, when
> fetched, showed a few recent sent messages, and then skipped
> over several thousand of them and showed messages from 2021 on
> back.  Now, if I did /o and told it to fetch all 28,000 or so
> headers, everything would then show up.
>
> I checked the usual suspects.  I was using (display . all).  I
> was using gnus-thread-sort-by-most-recent-date in the variable
> gnus-thread-sort-function.  I tried adding (not
> gnus-thread-sort-by-number) to no avail.
>
> Further research appeared to indicate that gnus fetches by the
> IMAP server's ID number, and the numbers on the gmail server
> appeared to have all of a sudden gotten out of sync with the
> email dates.  So if I fetched just a few headers, I would get
> the odd behavior described.  If I fetched all the headers,
> gnus would be able to sort all the mail in proper date order.
> In other words gnus couldn't sort headers it didn't have.
>
> There's nothing to do about this as it apparently is some sort
> of gmail problem.  On the web interface, of course, everything
> sorts as expected, but that's not what I care to use.
>
> What I did was move a few thousand emails out of Sent Mail and
> into the gmail archive.  In effect what this does is remove
> the Sent Mail label.  The mail still remains in gmails All
> Mail label.  Eventually I got to something that was more or
> less date sequential.
>
> The reason I'm posting here is to ask if anyone else has seen
> strange things like this when using gnus and gmail.  I'm not
> asking for a solution as it appears there is none, at least
> not on the gnus side.

Well that sounds very annoying! I suppose you already tried "M-g" to
request a new scan of this group in particular?

I do wish I understood what Gmail is doing there, to reset the article
numbers, and if there were anything Gnus could do automatically to
handle it more gracefully.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange article sorting from Gmail
  2023-10-19 19:23 ` Eric Abrahamsen
@ 2023-10-19 21:54   ` Bob Newell
  0 siblings, 0 replies; 3+ messages in thread
From: Bob Newell @ 2023-10-19 21:54 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding


> Well that sounds very annoying! I suppose you already tried "M-g" to
> request a new scan of this group in particular?

Sure did, and even went to the extreme of temporarily nuking
.newsrc.eld to force a complete rebuild of the group.  No
luck.  The fault is clearly on the gmail side.  And of course
as mentioned if I load ALL the headers into gnus, gnus then
sorts by date as expected.  However I'm not thrilled about
loading 28,000 headers during each gnus session.

> I do wish I understood what Gmail is doing there, to reset the article
> numbers, and if there were anything Gnus could do automatically to
> handle it more gracefully.

It has never happened before.  Something evidently triggered
it but I think it will forever remain a mystery.  I did search
around for a way to make gmail's IMAP fix the numbering by
renumbering everything by date, but so far I've not found a
way to do that.  (Well, there actually is.  I could download
all 28,000 emails --- not just the headers but the full text
and all the mime parts --- then delete everything from the
server, then restore everything by uploading all 28,000
messages.  I lack the courage, though.)

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-19 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 20:04 Strange article sorting from Gmail Bob Newell
2023-10-19 19:23 ` Eric Abrahamsen
2023-10-19 21:54   ` Bob Newell

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).