unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Feature Request: Message Grouping in Gnus
@ 2009-08-14 12:01 Volkan YAZICI
  2009-08-14 18:45 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: Volkan YAZICI @ 2009-08-14 12:01 UTC (permalink / raw)
  To: emacs-devel

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#




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

* Re: Feature Request: Message Grouping in Gnus
  2009-08-14 12:01 Feature Request: Message Grouping in Gnus Volkan YAZICI
@ 2009-08-14 18:45 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2009-08-14 18:45 UTC (permalink / raw)
  To: Volkan YAZICI; +Cc: ding, emacs-devel

On Fri, Aug 14 2009, Volkan YAZICI wrote:

> [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.]

gnu.emacs.gnus is the user list, whereas ding@gnus.org (cc-ed) is the
place where you can find Gnus developers.  I'd suggest to drop
emacs-devel on further replies.

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

Not sure why you use Received instead of Date.

>            (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?

I think it is really hard (or not possible) to combine threading with
date-based sorting.

As pointed out by Ted, you can display the date in the summary.


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

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

end of thread, other threads:[~2009-08-14 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14 12:01 Feature Request: Message Grouping in Gnus Volkan YAZICI
2009-08-14 18:45 ` Reiner Steib

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).