Gnus development mailing list
 help / color / mirror / Atom feed
From: Wes Hardaker <wes@hardakers.net>
Subject: patch for dynamic updates of the summary buffer while building
Date: Mon, 13 May 2002 09:35:10 -0700	[thread overview]
Message-ID: <sdhelcf1kx.fsf@wanderer.hardakers.net> (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

             reply	other threads:[~2002-05-13 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-13 16:35 Wes Hardaker [this message]
2002-05-14  1:45 ` Jesper Harder
2002-05-14  2:05   ` Wes Hardaker
2003-01-01 19:31 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sdhelcf1kx.fsf@wanderer.hardakers.net \
    --to=wes@hardakers.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).