From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36221 Path: main.gmane.org!not-for-mail From: Vladimir Volovich Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap and article line numbers Date: 15 May 2001 14:27:16 +0400 Sender: vvv@video.uic.vsu.ru Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035171844 7413 80.91.224.250 (21 Oct 2002 03:44:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:44:04 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 11835 invoked by alias); 15 May 2001 10:26:38 -0000 Original-Received: (qmail 11830 invoked from network); 15 May 2001 10:26:38 -0000 Original-Received: from relay1.vsu.ru (HELO vsu.ru) (62.76.169.14) by gnus.org with SMTP; 15 May 2001 10:26:38 -0000 Original-Received: from video.uic.vsu.ru ([62.76.169.38] verified) by vsu.ru (CommuniGate Pro SMTP 3.4.6) with ESMTP id 2816892; Tue, 15 May 2001 14:26:33 +0400 Original-To: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) In-Reply-To: (Kai.Grossjohann@CS.Uni-Dortmund.DE's message of "14 May 2001 13:10:51 +0200") User-Agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/20.7 Original-Lines: 26 Xref: main.gmane.org gmane.emacs.gnus.general:36221 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:36221 "KG" == Kai Großjohann writes: KG> ;; Use %c rather than %L because nnimap doesn't inlude the line KG> ;; count for attachments in the line count. (require 'gnus-sum) KG> (defsubst kai-gnus-summary-line-message-size (header) (let ((c KG> (or (mail-header-chars header) 0))) (cond ((< c 1000) (format KG> "%db" c)) ((< c (* 1000 1000)) (format "%dk" (/ c 1024.0))) (t KG> (format "%dM" (/ c (* 1024.0 1024))))))) (add-to-list KG> 'gnus-summary-line-format-alist '(?k KG> (kai-gnus-summary-line-message-size gnus-tmp-header) ?s)) KG> Now you can use %k in your summary line format. The comment is KG> slightly off, since it's from an old version. thanks. btw, the following format (%us) defined via gnus-user-format-function-X also works: (defun gnus-user-format-function-s (header) (let ((c (or (mail-header-chars header) 0))) (cond ((< c 1000) (format "%db" c)) ((< c (* 1000 1024)) (format "%dk" (/ c 1024.0))) (t (format "%dM" (/ c (* 1024.0 1024))))))) (setq gnus-summary-line-format "%U%R%z%I%(%[%4us: %-20,20n%]%) %s\n") Best, v.