[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sorting the summary
At Thu, 18 Nov 2010 10:55:19 -0800,
Erik Hetzner wrote:
>
> At Thu, 18 Nov 2010 12:27:08 -0600,
> Eric Larson wrote:
> >
> > I started using offlineimap to sync an imap mailbox but the way
> > offlineimap gets the mail messages seems to put them in random order
> > in the wl sumary. I'm wondering if there is a good way to
> > automatically sort by the date when starting the summary mode.
> >
> > I did try writing a hook using wl-summary-sort-by-date and
> > wl-summary-sort but both seemed to accept an array of messages (at
> > least that was my theory).
>
> Hi Eric,
>
> wl-summary-sort takes a prefix arg for reverse sort. All it does is
> prompt for a sort-by, then call wl-summary-rescan. Try calling:
>
> (wl-summary-rescan "date")
>
> best, Erik
>
That worked like a charm! Here is what I did in .wl:
;; sort the summary
(defun my-wl-summary-sort-hook ()
(wl-summary-rescan "date"))
(add-hook 'wl-summary-prepared-hook 'my-wl-summary-sort-hook)
Thanks!!
Eric