emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature Request: Message Grouping in Gnus


From: Volkan YAZICI
Subject: Feature Request: Message Grouping in Gnus
Date: Fri, 14 Aug 2009 15:01:44 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Hi,

[Sorry if this post doesn't belong to this mailing list -- I tried my
chance in Gnus mailing list[1] with no luck -- in such a case, any
pointers will be appreciated.]

It'd be really awesome if one would be able to group the messages listed
in the summary buffer in Gnus. Consider passing below function to some
sort of filter hook while grouping messages by day in the summary
buffer.

  (lambda ()
    (let* ((header (message-field-value "Received"))
           (pos
            (string-match
             (concat
              "\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\), " ; "Thu, "
              "\\([0-9]+\\) "                                   ; "13 "
              "\\([A-Za-z]\\{3\\}\\) "                          ; "Aug "
              "\\([0-9]\\{4\\}\\) "                             ; "2009 "
              "\\([0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\}\\) "   ; "23:23:29 "
              "\\([\\+\\-]\\{1\\}[0-9]+\\) "                    ; "+0300 "
              "(\\([^) ]+\\))")                                 ; "(EEST)"
             header)))
      (when pos
        (concat
         (subseq header (match-beginning 2) (match-end 2)) " "  ; "13 "
         (subseq header (match-beginning 3) (match-end 3)) " "  ; "Aug "
         (subseq header (match-beginning 4) (match-end 4))))))  ; "2009 "

And the expected output could be something similar to below.

  === INPUT ===
  [  20: Jared C. Davis         ] hash table resizing
      [  49: Gary Byers             ]
  [  30: Doug Currie            ] IDE nits
      [  72: Gary Byers             ]
      [  18: Gail Zacharias         ]
  [  20: Ron Garret             ] Embedding CPython in CCL
      [  35: Ian Eslick             ]
          [  54: Ron Garret             ]

  === OUTPUT ===
  ---- 1 Aug 2009 ----
  [  20: Jared C. Davis         ] hash table resizing
      [  49: Gary Byers             ]
  [  30: Doug Currie            ] IDE nits
      [  72: Gary Byers             ]
  [  20: Ron Garret             ] Embedding CPython in CCL
  ---- 2 Aug 2009 ----
  [  72: Gary Byers             ] Re: IDE nits
    [  18: Gail Zacharias         ]
  [  35: Ian Eslick             ] Re: Embedding CPython in CCL
    [  54: Ron Garret             ] 

Is such a thing possible? Any comments?


Regards.

[1] 
http://groups.google.com/group/gnu.emacs.gnus/browse_frm/thread/797d30d14dfa068f#




reply via email to

[Prev in Thread] Current Thread [Next in Thread]