Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org
Subject: Re: nnimap and article line numbers
Date: 14 May 2001 13:10:51 +0200	[thread overview]
Message-ID: <vaf1yps18zo.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: <eyy9s0dymx.fsf@video.uic.vsu.ru> (Vladimir Volovich's message of "14 May 2001 14:16:06 +0400")

On 14 May 2001, Vladimir Volovich wrote:

> so, is it possible to change the line number reports for the nnimap
> backend to show the size of the raw article?

No, but I use the number of characters (or bytes?) for this, using the
following hack:

;; Use %c rather than %L because nnimap doesn't inlude the line
;; count for attachments in the line count.
(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))

Now you can use %k in your summary line format.  The comment is
slightly off, since it's from an old version.

kai
-- 
The passive voice should never be used.


  reply	other threads:[~2001-05-14 11:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-14 10:16 Vladimir Volovich
2001-05-14 11:10 ` Kai Großjohann [this message]
2001-05-15 10:27   ` Vladimir Volovich
2001-05-14 20:33 ` Simon Josefsson
2001-05-15  7:17   ` Simon Josefsson
2001-05-15 10:05     ` Vladimir Volovich

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=vaf1yps18zo.fsf@lucy.cs.uni-dortmund.de \
    --to=kai.grossjohann@cs.uni-dortmund.de \
    --cc=ding@gnus.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).