3

In years of using Emacs I never used it for e-mails. Always saw it as a very convoluted system to do it (let alone e-mails are a too convoluted system to do messaging, but that's a different gripe). Now, first time using Gnus and connecting it to GMail, the e-mails that appear in the inbox arrive in no order or sequence. For example, a message from about 2 years ago appears in the top of the list, followed by another one from the last week, while a bunch of messages received today aren't loaded at all.

Unfortunately, I've went too far with experimenting with my X-server... and I need the cover-up for the times it will not start... :)

I'm suspecting that the selection of messages may be affected by the "status" or some sort of priority GMail, out of its robotic mind, is assigning to these messages - apparently, wrong. If my guess is true, can this behavior be overridden such as to load the messages in the same order they were received? This would help me a lot. Thanks in advance!

I gave up editing somewhere more towards the middle, but, start reading from the end, you will get the idea before I gave up:

!. [   8: ***********            ] *****, *****!!! check this out(:  # Can't even find this...
 . [   0: ***********            ]                                 
!. [  19: ***********            ] Re: Hello ****. Nice to meet you
 . [ 162: Twitter                ] ******, ***** ******, and 2 othe 
 . [  38: Vimeo                  ] Welcome to Vimeo!                  # Almost two years ago
!. [  25: ***********            ] Re: Do you use haxe-mode still?  
!. [  58: ***************        ] Re: wvxvw (*****) from lispforum
!. [  26: *************          ] Re: bug#11813: Segmentation fault
 . [ 174: Open Spoon Foundation  ] Apache Flex Community Revue July 
!. [  72: *************          ] Re: bug#11850: crash (null font)   # Second newest        (1)
!. [  42: *************          ] Re: bug#11813: bug#11850: crash (  # Received a month ago
!.     <  17: ***********           > 
!. [  25: ACM International Confe] ICFP Programming Contest: one wee
!. [  19: ACM International Confe] Message to attendees of ICFP 2012
!. [  57: ***************        ] Probably no one else for ICFP    
!. [  61: ************           ] Re: bug#11850: bug#11813: bug#118
 . [  55: ********** via LinkedIn] ת מעצב למישהו עם שנה ניסיון ומעלה
!. [   5: ***************        ] Be wary of Dropbox and git repos
 . [  14: ACM International Confe] Task Details for ICFP 2012 Progra  # 
 . [  26: ACM International Confe] How to contact us during the Cont
 . [  14: ACM International Confe] Submission
 . [  15: ACM International Confe] Lightning Division Entry MD5 Keys
 . [  14: ACM International Confe] Underground growths
 . [  15: ACM International Confe] More Lambdas
 . [  19: ***************        ] Re: [CLSQL] OUTER JOIN             # This actually arrived before
 . [  28: ***************        ] [CLSQL] Problem with clsql-mysql.d # the patch.
 .     [  30: ************           ]                                #
 .         [  36: ***************        ]                            #                           
!. [   2: Unblock Review Team    ] Response to your unblock appeal    # They blocked me instead of 
                                                                      # some other dude!                          
 . [  15: CouchSurfing           ] We miss you on CouchSurfing!       # Stopped counting :)
------------------- missing 1 message here  ---------------------------------------------------------
 . [  18: ****************       ] [CLSQL] [PATCH] Clisp portability
------------------- missing 1 message here  ---------------------------------------------------------
 . [  33: ***************        ] Re: [CLSQL] CLSQL Digest, Vol 56,                        
 . [  23: ***************        ] [CLSQL] Newbie troubles with the t                      
 .     [  52: ********           ]                                     
------------------- missing 5 messages here ---------------------------------------------------------
!. [  20: agent.ruby@amd.com     ] AMD Game subscription update.                                  
 . [  29: *********              ] Re: hey (******)                    # This is the 57'th newest (11)
 .     [  34: *****              ]                                     # This message has 12 more 
                                                                       # responses
------------------- missing 25 messages here --------------------------------------------------------
 . [  91: Glassdoor              ] Lots of new jobs on Glassdoor - ma     
!. [  21: ***************        ] Hi there                            # This is the 32'th newest (10)
------------------- missing 7 messages here ---------------------------------------------------------
 . [  17: **********             ] [CLSQL] Postmodern changes affecti  # Received about a year ago
 .     [  32: ********           ]                                     # 
 . [  98: **********             ] [CLSQL] clsql on cmucl under 64 bi  # This is the 25'th newest (9)
------------------- missing 5 messages here ---------------------------------------------------------
 . [  10: Coursera               ] Welcome to Coursera!                # This is the 19'th newest (7)
 . [   1: Machine Learning | Cour] Welcome to Machine Learning!        # This is the 20'th newest (8)
------------------- missing 3 messages here ---------------------------------------------------------
 . [ 146: Jobmaster.co.il        ] כוז הצעות עבודה לתאריך: 22/08/2012  # This is the 16'th newest (6)
------------------- missing 5 messages here ---------------------------------------------------------   
 . [  49: <***************@mail.r] [CLSQL] CLSQL on ECL                # This is the 11'th newest (5) 
------------------- missing 2 messages here ---------------------------------------------------------                    
 . [  41: Mail Delivery Subsystem] Delivery Status Notification (Fail
------------------- missing 1 message here  ---------------------------------------------------------
 . [ 148: Jobmaster.co.il        ] כוז הצעות עבודה לתאריך: 23/08/2012  # This is the 6'th newest  (4)
 . [  87: Udacity                ] Udacity Newsletter - August 2012    # This is the 5'th newest  (3)
------------------- missing 2 messages here ---------------------------------------------------------
 . [  17: ************           ] call today                          # This is the newest       (0)

EDIT

I've tried Alpine mail agent today to see if this might be related to the way GMail serves the mail, but, I'm sorry, it's the problem with Gnus, or with my configuration of it, below is the listing of roughly the same period, the same mailbox retrieved through Alpine:

    2004 Aug 13     Nisha Hitech                   (15K) Nisha Group - Recruitment & Placement
    2005 Aug 14     ***** *********** via LinkedIn (13K) Join my network on LinkedIn
  N 2006 Aug 14     Glassdoor                      (34K) Lots of new jobs on Glassdoor - maybe
    2007 Aug 16     ***** ******                    (4K) Re: bug#11850: bug#11813: bug#11850: 
*   2008 Aug 16     ***** *********                 (4K) Hi there
    2009 Aug 16     ****** ****                     (2M) Quiz - stuff
    2010 Aug 16     ****** ****                    (.6M) XML
    2011 Aug 17     ****** ****                     (1M) Updated quiz
  N 2012 Aug 17     **** *****                      (7K) [CLSQL] Postmodern changes affecting 
  N 2013 Aug 17     **** *******                    (6K) Re: [CLSQL] Postmodern changes affect
    2014 Aug 17     ****** ****                     (1M) Adjustments
    2015 Aug 17     ****** ****                    (17K) Re: Adjustments
    2016 Aug 18     ****** ****                     (1M) Updated
    2017 Aug 18     Sampler                         (9K) Error
    2018 Aug 18     ****** ****                    (.5M) Score
    2019 Aug 18     ****** ****                    (17K) Re: Score
    2020 Aug 19     donotreply@hunterhrms.com       (2K) Thank you for your CV
    2021 Aug 19     **** ******- Hiway             (18K) בהמשך לשיחתנו
    2022 Aug 19     ****** *****                   (62K) חבר ITR-משרות פיתוח פלאש
    2023 Aug 19     **** ******- Hiway             (19K) RE: בהמשך לשיחתנו
    2024 Aug 19     ***** *********                (15K) Re: Hi there
    2025 Aug 19     *** *******                     (2K) flash
    2026 Aug 19     *** *******                     (2K) sent you an email on other address
    2027 Aug 19     *** *******                     (4K) Re: sent you an email on other addres
    2028 Aug 20     ****** ****                     (8K) Fwd: Machine Learning is now live!
    2029 Aug 20     service@paypal.co.il           (10K) How to reset your PayPal password
    2030 Aug 20     service@paypal.co.il            (9K) You just changed your password
    2031 Aug 20     service@paypal.co.il            (8K) You linked your bank account to your 
    2032 Aug 20     ****** ****                     (3K) Re: Machine Learning is now live!
    2033 Aug 20     NCsoft Support                  (3K) Verify your e-mail address for your N
    2034 Aug 20     NCsoft Support                  (4K) Thank you for creating a new NCsoft M
  N 2035 Aug 20     ***** ****                     (10K) [CLSQL] clsql on cmucl under 64 bit u
    2036 Aug 20     *** *. via LinkedIn            (13K) Join my network on LinkedIn
    2037 Tuesday    Reggae                          (3K) Re: Machine Learning is now live!
  N 2038 Tuesday    Machine Learning | Coursera St  (3K) Welcome to Machine Learning!
  N 2039 Tuesday    Coursera                        (4K) Welcome to Coursera!
    2040 Tuesday    *** ******** via LinkedIn       (6K) nice meeting you
    2041 Tuesday    *** ********                    (9K) RE: Join my network on LinkedIn
    2042 Tuesday    *** ********                    (3K) RE: Join my network on LinkedIn
    2043 Tuesday    הסוכן החכם של ג'ובנט           (32K) דרוש/ה GUI FLEX Architect
    2044 Aug 19     ***** ******                    (5K) Carambola - ****
    2045 Wednesday  **** *****                      (1K) Re: Carambola - ****
    2046 Wednesday  *** ********                    (4K) RE: Join my network on LinkedIn
    2047 Wednesday  ***** ******                    (5K) Re: Carambola - ****
    2048 Wednesday  *** ********                    (4K) RE: Join my network on LinkedIn
  N 2049 Thursday   Jobmaster.co.il                (16K) ריכוז הצעות עבודה לתאריך: 22/08/2012
    2050 Thursday   ***** ******                   (17K) Re: Carambola - ****
  N 2051 Thursday   ***************@mail.ru         (7K) [CLSQL] CLSQL on ECL
    2052 Thursday   web-admin@winehq.org            (2K) Welcome to "WineHQ Forums"
    2053 Thursday   web-admin@winehq.org            (2K) Topic approved - "OpenGL renderer isn
  N 2054 Thursday   Mail Delivery Subsystem         (3K) Delivery Status Notification (Failure
    2055 Thursday   web-admin@winehq.org            (2K) Post approved - "Re: OpenGL renderer 
  N 2056 Friday     Jobmaster.co.il                (16K) ריכוז הצעות עבודה לתאריך: 23/08/2012
  N 2057 Thursday   Udacity                        (28K) Udacity Newsletter - August 2012
    2058 Friday     ggtse@gigabyte.com.tw           (5K) GIGABYTE Tech. Support Reply Notifica
    2059 Friday     web-admin@winehq.org            (2K) Post approved - "Re: OpenGL renderer 
    2060 Yesterday  ***** ******                    (5K) Re: bug#11850: bug#11813: bug#11850: 
    2061 Yesterday  *** ********                    (4K) call today

2 Answers2

2

The ordering that the messages are indexed in is controlled by the server (gmail), not Emacs/Gnus. I guess that in optimizing their server for large volumes of messages, Google broke with convention, and article numbers are no longer assigned sequentially. The only answer really is to download all the headers so Gnus can do the sorting itself based on date or whatever your preference is. You may want to clean up your INBOX first if you have a lot of mail in there.

JSON
  • 4,487
  • 22
  • 26
1

Have a look at this page in the Gnus manual. Basically, Gnus defaults to sorting by article number. This has always been pretty much date order for me, but maybe something weird happened with your GMail emails - did you import them from another mail server maybe? (I have no idea - I'm just guessing)

Anyway, I would guess you want something like

(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
        gnus-thread-sort-by-date))

Note this assumes that you're using a threaded display (which is the default and probably what you want). If not, the page I linked to has the relevant modifications.

Rupert Swarbrick
  • 2,793
  • 16
  • 26
  • And I should say, the Gnus manual is actually quite readable (and quite funny at times - have a look at the "Emacs for heathens" section). I worked out a lot by idly reading random pages... – Rupert Swarbrick Aug 26 '12 at 10:33
  • Ah, I see. That isn't clear from your question. I think you mean that when you enter a group, you are asked how many headers to fetch? Then you have to guess and there's no correlation between the order in which they are fetched and the emails' dates? I think there's nothing Gnus or any other client can do about that without storing all headers locally: I think the IMAP protocol does stuff by message number. – Rupert Swarbrick Aug 26 '12 at 10:44
  • Note that message numbers aren't re-used when messages are deleted. As such, you can answer "1000" to the "how many messages?" question and end up with far fewer. Another solution is to search: I tend to use "G G" on the group to search by name / subject. Indeed, I use GMail and keep almost nothing in the Inbox. Stuff that I might want to look up later survives in the "All mail" folder, searchable with "G G". – Rupert Swarbrick Aug 26 '12 at 10:45
  • 1
    Dunno, but that's Gmail's fault, not Gnus's - the server chooses message numbers, not the client. – Rupert Swarbrick Aug 26 '12 at 10:47
  • I wanted to check that I wasn't talking nonsense, so looked up the IMAP4 spec. Basically the point is that the FETCH command (section [6.4.5](https://tools.ietf.org/html/rfc3501#section-6.4.5) of the spec) takes a list of message IDs, so there's not really anything more sensible the client can do. – Rupert Swarbrick Aug 26 '12 at 10:57