From 758845a0bd4920d46dbbbe6e4dcb46498cb25ef1 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 25 Sep 2010 15:07:55 +0000 Subject: [PATCH] nndraft.el (nndraft-retrieve-headers): Insert Lines and Chars headers for prettier summary display. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/nndraft.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index db1c287e3e5..3bfb4119959 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2010-09-25 Lars Magne Ingebrigtsen + + * nndraft.el (nndraft-retrieve-headers): Insert Lines and Chars headers + for prettier summary display. + 2010-09-25 Andrew Cohen (tiny change) * nnir.el (nnir-run-imap): Allow sending IMAP search patterns diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 157c65da8d1..313675c2fac 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -79,7 +79,7 @@ are generated if and only if they are also in `message-draft-headers'.") (nndraft-possibly-change-group group) (with-current-buffer nntp-server-buffer (erase-buffer) - (let* (article) + (let (article lines chars) ;; We don't support fetching by Message-ID. (if (stringp (car articles)) 'headers @@ -91,9 +91,12 @@ are generated if and only if they are also in `message-draft-headers'.") (if (search-forward "\n\n" nil t) (forward-line -1) (goto-char (point-max))) + (setq lines (count-lines (point) (point-max)) + chars (- (point-max) (point))) (delete-region (point) (point-max)) (goto-char (point-min)) (insert (format "221 %d Article retrieved.\n" article)) + (insert (format "Lines: %d\nChars: %d\n" lines chars)) (widen) (goto-char (point-max)) (insert ".\n"))) -- 2.39.5