Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: kai.grossjohann@uni-duisburg.de (Kai Großjohann)
Subject: Re: gnus-sum and gnus-extra-headers
Date: Tue, 10 Dec 2002 09:41:52 +0100	[thread overview]
Message-ID: <84smx6p8of.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <m3y96zm8yc.fsf@bonklt.geology.utoronto.ca>

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)


           reply	other threads:[~2002-12-10  8:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <m3y96zm8yc.fsf@bonklt.geology.utoronto.ca>]

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=84smx6p8of.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@uni-duisburg.de \
    /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).