From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47244 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: spam.el and missing functions Date: Thu, 17 Oct 2002 18:24:30 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1034846831 19228 80.91.224.249 (17 Oct 2002 09:27:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 17 Oct 2002 09:27:11 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1826vu-0004zz-00 for ; Thu, 17 Oct 2002 11:27:10 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1826ts-0000CW-00; Thu, 17 Oct 2002 04:25:04 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 17 Oct 2002 04:25:46 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id EAA07312 for ; Thu, 17 Oct 2002 04:25:25 -0500 (CDT) Original-Received: (qmail 17525 invoked by alias); 17 Oct 2002 09:24:38 -0000 Original-Received: (qmail 17517 invoked from network); 17 Oct 2002 09:24:37 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 17 Oct 2002 09:24:37 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 1827kT-00058U-00 for ; Thu, 17 Oct 2002 12:19:25 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 54 Original-NNTP-Posting-Host: 207.228.244.150 Original-X-Trace: quimby.gnus.org 1034849965 18909 207.228.244.150 (17 Oct 2002 10:19:25 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 17 Oct 2002 10:19:25 GMT User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Military Intelligence (RC3), sparc-sun-solaris2.6) X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:HZZfiSe7231Vid3C0ywkWxU32RU= X-Hashcash: 021017:gnus.ding:18ca9eeff09b54c0 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47244 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47244 --=-=-= Hi, >>>>> In >>>>> Ted Zlatanov wrote: > (summary: BBDB problems fixed, I need help with locate-file and > display-message-or-buffer) Here's a replacement for display-message-or-buffer. How about it? --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (defun spam-display-buffer-contents () "Display contents of the current buffer in the echo area if possible, otherwise pop-up the buffer itself." (unless (zerop (buffer-size)) (if (<= (count-lines (point-min) (point-max)) 1) (progn (goto-char (point-max)) (when (bolp) (backward-char 1)) (message "%s" (buffer-substring (point-min) (point)))) (goto-char (point-min)) (display-buffer (current-buffer))))) --=-=-= Content-Disposition: inline --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- spam.el~ 2002-10-14 21:52:48 +0000 +++ spam.el 2002-10-17 09:22:50 +0000 @@ -469,9 +469,7 @@ (spam-bogofilter-articles nil "-v" (list (gnus-summary-article-number))) (save-excursion (set-buffer spam-output-buffer-name) - (unless (= (point-min) (point-max)) - (display-message-or-buffer (current-buffer) - spam-output-buffer-name))))) + (spam-display-buffer-contents)))) (defun spam-bogofilter-register-routine () (when (and spam-use-bogofilter spam-bogofilter-path) --=-=-=--