info-gnus-english
[Top][All Lists]
Advanced

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

Re: Awesome eyecandy in the wikipedia article


From: Michael Chen
Subject: Re: Awesome eyecandy in the wikipedia article
Date: Tue, 16 Jun 2009 18:34:18 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (windows-nt)

Manish Sharma <mailtomanish.sharma@gmail.com> writes:

>>>>>> "Leo" == Leo  <sdl.web@gmail.com> writes:
>
> Leo> On 2008-01-10 21:06 +0000, rtra wrote:
>>> The gnus screenshot at http://en.wikipedia.org/wiki/Gnus is awesome!
>>> How can I get my gnus to look like that?
>>> 
>>> Thanks for any tip.
>
> Leo> That's my screen shot. The settings are as follows:
>
> Thanks for sharing your settings, Leo.  They are nice.
>
> Leo> ;;; threading (setq gnus-face-9 'font-lock-warning-face) (setq
> Leo> gnus-face-10 'shadow) (defun sdl-gnus-summary-line-format-ascii nil
> Leo> (interactive) (setq gnus-summary-line-format (concat "%0{%U%R%z%}"
> Leo> "%10{|%}" "%1{%d%}" "%10{|%}" "%9{%u&@;%}" "%(%-15,15f %)"
> Leo> "%10{|%}" "%4k" "%10{|%}" "%2u&score;" "%10{|%}" "%10{%B%}"
>
> Can you please share the code behind &@ and &score?  Your code/settings
> do not work without that.
>
> Thank you,

Hi, I googled around and found the required functions:

(defun gnus-user-format-function-@ (header)
"Display @ for message with attachment in summary line.

You need to add `Content-Type' to `nnmail-extra-headers' and
`gnus-extra-headers', see Info node `(gnus)To From Newsgroups'."
(let ((case-fold-search t)
(ctype (or (cdr (assq 'Content-Type (mail-header-extra header)))
"text/plain"))
indicator)
(when (string-match "^multipart/mixed" ctype)
(setq indicator "@"))
(if indicator
indicator
" ")))

(defalias 'gnus-user-format-function-score 'rs-gnus-summary-line-score)

(defun rs-gnus-summary-line-score (head)
  "Return pretty-printed version of article score.

See (info \"(gnus)Group Line Specification\")."
  (let ((c (gnus-summary-article-score (mail-header-number head))))
    ;; (gnus-message 9 "c=%s chars in article %s" c (mail-header-number head))
    (cond ((< c -1000)     "vv")
          ((< c  -100)     " v")
          ((< c   -10)     "--")
          ((< c     0)     " -")
          ((= c     0)     "  ")
          ((< c    10)     " +")
          ((< c   100)     "++")
          ((< c  1000)     " ^")
          (t               "^^"))))



Michael


reply via email to

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