Gnus development mailing list
 help / color / mirror / Atom feed
* patch for dynamic updates of the summary buffer while building
@ 2002-05-13 16:35 Wes Hardaker
  2002-05-14  1:45 ` Jesper Harder
  2003-01-01 19:31 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Wes Hardaker @ 2002-05-13 16:35 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 410 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 2451 bytes --]

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.

[-- Attachment #3: Type: text/plain, Size: 153 bytes --]


-- 
"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-01 19:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-13 16:35 patch for dynamic updates of the summary buffer while building Wes Hardaker
2002-05-14  1:45 ` Jesper Harder
2002-05-14  2:05   ` Wes Hardaker
2003-01-01 19:31 ` Lars Magne Ingebrigtsen

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).