So the patch that I thought fixed it is in fact nothing to do with the
root cause, it just hides the symptoms in some cases. I noticed on
further investigation that basically handling of multiple labels per
message is completely screwed.
After another two hours with edebug, the real problem turns out to be
very simple (but a pig to find):

*** vm-summary.el       2012/06/13 17:49:27     1.2
--- vm-summary.el       2013/01/09 10:55:24     1.3
***************
*** 1716,1722 ****
    (or (vm-label-string-of m)
        (vm-set-label-string-of
         m
!        (mapconcat 'identity (sort (vm-labels-of m) 'string-lessp) ","))
        (vm-label-string-of m)))
  
  (defun vm-make-folder-summary ()
--- 1716,1722 ----
    (or (vm-label-string-of m)
        (vm-set-label-string-of
         m
!        (mapconcat 'identity (sort (copy-sequence (vm-labels-of m)) 
'string-lessp) ","))
        (vm-label-string-of m)))
  
  (defun vm-make-folder-summary ()


Presumably Uday's already noticed this at some point, since trunk does
have the protective copy-sequence.

Reply via email to