Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: gnus-sum and gnus-extra-headers
       [not found] <m3y96zm8yc.fsf@bonklt.geology.utoronto.ca>
@ 2002-12-10  8:41 ` Kai Großjohann
  0 siblings, 0 replies; only message in thread
From: Kai Großjohann @ 2002-12-10  8:41 UTC (permalink / raw)


Uli Wortmann <uli.wortmann@utoronto.ca> writes:

> A year ago, I added a function to see the message size  in the summary
> buffer (following a posting from Kai). Now, I tried to see the
> recipient instead of the sender in archive groups. It turns out, the
> the following code is somehow disabling the
> gnus-extra-headers/gnus-ignored-from-addresses business:
>
> (require 'gnus-sum)
> (defsubst kai-gnus-summary-line-message-size (header)
>  (let ((c (or (mail-header-chars header) 0)))
>     (cond ((< c 1000) (format "%db" c))
>           ((< c (* 1000 1000)) (format "%dk" (/ c 1024.0)))
>          (t (format "%dM" (/ c (* 1024.0 1024)))))))
> (add-to-list 'gnus-summary-line-format-alist
>              '(?k (kai-gnus-summary-line-message-size gnus-tmp-header)
> ?s))

Are you saying that the above code makes it break if you use the
settings below?

That would be really weird, for the settings below do not use the
above code at all!  How can code that isn't used break anything?

> Here is my setup of the gnus extra headers
>
> (setq gnus-extra-headers '(To CC Newsgroups))
> (setq nnmail-extra-headers gnus-extra-headers)
> (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20f%]%) %s\n")
> (setq gnus-ignored-from-addresses ".*uli\.wortmann.*")

Irrelevant hint: write \\. instead of \. in Lisp strings in regexes
when you mean a literal dot.  For regexes in Lisp strings,
backslashes need to be doubled.

> I'm not a list programmer, but I'd appreciate any hint.

But since you do not use %k in gnus-summary-line-format, you can
easily turn my code off.

PS: I had "below settings" instead of "settings below" in an earlier
    draft of this message, but then changed it because it looked
    strange.  Yet, "above code" and "below settings" appear to be
    quite analogous.  Hm.  Maybe I could have used "code above"
    together with "settings below" for consistency.

    Which is (are) correct?
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-10  8:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m3y96zm8yc.fsf@bonklt.geology.utoronto.ca>
2002-12-10  8:41 ` gnus-sum and gnus-extra-headers Kai Großjohann

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