Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Michael Chen <blorbx@yahoo.com>
To: info-gnus-english@gnu.org
Subject: Re: Awesome eyecandy in the wikipedia article
Date: Tue, 16 Jun 2009 18:34:18 -0400	[thread overview]
Message-ID: <u7hzbreol.fsf@GRUMPY.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <mailman.4715.1231833916.26697.info-gnus-english@gnu.org>

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

      parent reply	other threads:[~2009-06-16 22:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 21:06 rtra
2008-01-11  8:08 ` Slackrat
2008-01-11  8:39 ` Glyn Millington
     [not found] ` <mailman.6019.1200040900.18990.info-gnus-english@gnu.org>
2008-01-11 13:51   ` Randy Yates
2008-01-11 15:09     ` Andrzej Adam Filip
2008-01-11 18:22       ` Reiner Steib
2008-01-12 18:29         ` Andrzej Adam Filip
2008-02-12 12:16         ` Sébastien Vauban
2008-03-31  0:17           ` Christos Chryssochoidis
2008-03-31 22:09             ` Paulo Jorge de O. C. de Matos
2008-01-11 17:42 ` Leo
2008-01-12  4:28   ` Austin Frank
2009-01-13  7:59   ` Manish Sharma
     [not found]   ` <mailman.4715.1231833916.26697.info-gnus-english@gnu.org>
2009-06-16 22:34     ` Michael Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u7hzbreol.fsf@GRUMPY.i-did-not-set--mail-host-address--so-tickle-me \
    --to=blorbx@yahoo.com \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).