From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44810 Path: main.gmane.org!not-for-mail From: Wes Hardaker Newsgroups: gmane.emacs.gnus.general Subject: patch for dynamic updates of the summary buffer while building Date: Mon, 13 May 2002 09:35:10 -0700 Organization: Network Associates - NAI Labs Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1021307793 16687 127.0.0.1 (13 May 2002 16:36:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 13 May 2002 16:36:33 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 177IoL-0004L2-00 for ; Mon, 13 May 2002 18:36:33 +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 177InR-0003EP-00; Mon, 13 May 2002 11:35:37 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 13 May 2002 11:35:55 -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 LAA02051 for ; Mon, 13 May 2002 11:35:43 -0500 (CDT) Original-Received: (qmail 18725 invoked by alias); 13 May 2002 16:35:20 -0000 Original-Received: (qmail 18720 invoked from network); 13 May 2002 16:35:19 -0000 Original-Received: from adsl-66-127-127-227.dsl.scrm01.pacbell.net (HELO wanderer.hardakers.net) (@66.127.127.227) by gnus.org with SMTP; 13 May 2002 16:35:19 -0000 Original-Received: (from hardaker@localhost) by wanderer.hardakers.net (8.11.6/8.11.6) id g4DGZBT02373; Mon, 13 May 2002 09:35:11 -0700 Original-To: ding@gnus.org X-Face: #qW^}a%m*T^{A:Cp}$R\"38+d}41-Z}uU8,r%F#c#s:~Nzp0G9](s?,K49KJ]s"*7gvRgA SrAvQc4@/}L7Qc=w{)]ACO\R{LF@S{pXfojjjGg6c;q6{~C}CxC^^&~(F]`1W)%9j/iS/ IM",B1M.?{w8ckLTYD'`|kTr\i\cgY)P4 Original-Lines: 16 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.5 (bamboo, i686-pc-linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44810 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44810 --=-=-= Ok, I got tired of watching the "Building summary buffer" message. It turns out (at least if you use threads), it's not to hard to see something different. This patch is not exactly perfectly thought out and I'm not sure that it'll do strange things on some very customized displays (but it works fine on my very customized display). Now, the summary buffer is built dynamically and I can watch it build. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=patch Index: gnus-sum.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v retrieving revision 6.207 diff -u -r6.207 gnus-sum.el --- gnus-sum.el 2002/04/17 08:54:21 6.207 +++ gnus-sum.el 2002/05/13 16:43:56 @@ -4380,6 +4380,8 @@ (let ((gnus-tmp-level 0) (default-score (or gnus-summary-default-score 0)) (gnus-visual-p (gnus-visual-p 'summary-highlight 'highlight)) + (building-line-count gnus-summary-display-while-building) + (building-count (integerp gnus-summary-display-while-building)) thread number subject stack state gnus-tmp-gathered beg-match new-roots gnus-tmp-new-adopts thread-end gnus-tmp-header gnus-tmp-unread @@ -4399,6 +4401,8 @@ ;; Do the threaded display. + (if gnus-summary-display-while-building + (switch-to-buffer (buffer-name))) (while (or threads stack gnus-tmp-new-adopts new-roots) (if (and (= gnus-tmp-level 0) @@ -4643,6 +4647,17 @@ (push (if (nth 1 thread) 1 0) tree-stack) (incf gnus-tmp-level) (setq threads (if thread-end nil (cdar thread))) + (if gnus-summary-display-while-building + (if building-count + (progn + ;; use a set frequency + (setq building-line-count (1- building-line-count)) + (when (= building-line-count 0) + (sit-for 0) + (setq building-line-count + gnus-summary-display-while-building))) + ;; always + (sit-for 0))) (unless threads (setq gnus-tmp-level 0))))) (gnus-message 7 "Generating summary...done")) @@ -4954,7 +4969,8 @@ (defun gnus-articles-to-read (group &optional read-all) "Find out what articles the user wants to read." - (let* ((articles + (let* ((display (gnus-group-find-parameter group 'display)) + (articles ;; Select all articles if `read-all' is non-nil, or if there ;; are no unread articles. (if (or read-all @@ -8587,6 +8603,15 @@ If nil, use to the current newsgroup method." :type 'symbol :group 'gnus-summary-mail) + +(defcustom gnus-summary-display-while-building 5 + "If not-nil, show and update the summary buffer as it's being built. +If the value is t, update the buffer after every line is inserted. If +the value is an integer (N), update the display every N lines." + :group 'gnus-thread + :type '(choice (const :tag "off" nil) + number + (const :tag "frequently" t))) (defun gnus-summary-respool-article (&optional n method) "Respool the current article. --=-=-= -- "The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -- Terry Pratchett --=-=-=--